Jump to content

Batch File GUI


jpaytoncfd

Recommended Posts

I have a CMD program that checks xp keys for the PID. the batch file looks like:

@echo off

CHKPIDS M4YRW-BMBQP-HH2CP-TG37G-Y76RM

pause

END

and the output is:

"Key","Grade","PID","Flags"
"M4YRW-BMBQP-HH2CP-TG37G-Y76RM","{;OEM-CH_HOME-SP2-37973878;}","(55274-OEM-0011903-00584)","[;OEM;OEM-]"
Press any key to continue . . .

I want to make a GUI that will ask for the key: M4YRW-BMBQP-HH2CP-TG37G-Y76RM, and output just the PID: 55274-OEM-0011903-00584

Link to comment
Share on other sites


You don't need to ask for a Product Key in order to provide the PID, you can simply get it from the registry:

@FOR /F "TOKENS=3" %%# IN ('REG QUERY HKLM\SOFTWARE\MICROSOFT\WINDOWS\CURRENTVERSION /V PRODUCTID^|FIND "REG_"') DO @ECHO=%%#

Link to comment
Share on other sites

You don't need to ask for a Product Key in order to provide the PID, you can simply get it from the registry:

@FOR /F "TOKENS=3" %%# IN ('REG QUERY HKLM\SOFTWARE\MICROSOFT\WINDOWS\CURRENTVERSION /V PRODUCTID^|FIND "REG_"') DO @ECHO=%%#

That works great if the system is running. I make restore disks and no one buys one untill the computer is dead. so right now they have to give me the key and I have to manually test it with all versions. Then I found this little cmd app that does exactly what I need. I would like to package it in a nice app so I can send it to the customer and let them get the PID. Most people arent that comfortable sending me the key, and I dont blame them.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...