jpaytoncfd Posted July 6, 2011 Posted July 6, 2011 I have a CMD program that checks xp keys for the PID. the batch file looks like:@echo offCHKPIDS M4YRW-BMBQP-HH2CP-TG37G-Y76RMpauseENDand 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
Yzöwl Posted July 6, 2011 Posted July 6, 2011 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=%%#
jpaytoncfd Posted July 6, 2011 Author Posted July 6, 2011 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.
Yzöwl Posted July 6, 2011 Posted July 6, 2011 Well that's all you're getting, you are not selling something for which I or other Members have provided the expertise.Topic Closed.
Recommended Posts