|
-
Sep 5th, 2009, 09:44 PM
#1
Thread Starter
New Member
Product keys and the registry
Hello folks.
I am a PC repair and networking technician in Bellingham, WA. I have been given a task regarding CD/Product keys and developing a small stand alone program that will scan and pull customer's product keys prior to reloading their OS.
Much like this one: http://www.klinzmann.name/licensecrawler.htm
If anyone can kick start me to create one of these progs, I'd appreciate it.
-
Sep 5th, 2009, 09:58 PM
#2
Re: Product keys and the registry
Is it safe to assume you've never worked with the registry with Vb .NET before?
If not, then I would recommend reading up on some tutorials from Google. There is also a wealth of info here on this site.
Next, you'll need to locate where the info is in the registry. I know that most of the installed application are located in: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Products
You can check the files within that key to see if any of them pertain to the product keys.
I also know that Office 11.0 stores it's key in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\11.0\Registration\{90110409-6000-11D3-8CFE-0150048383C9} and Office 12.0 in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\12.0\Registration\{90120000-0021-0000-0000-0000000FF1CE}\.
The key is kept in the DigitalProductID item within that key.
Windows' keeps its DigitalProductID in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\.
That should get you started.
CodeBank contributions: Process Manager, Temp File Cleaner
 Originally Posted by SJWhiteley
"game trainer" is the same as calling the act of robbing a bank "wealth redistribution"....
-
Sep 5th, 2009, 10:01 PM
#3
Thread Starter
New Member
Re: Product keys and the registry
I have worked with VB.net and the registry. I have never done so in order to retrieve product keys for a customer, prior to reinstalling their OS.
The program link I posted pulls ALL product keys from the registry that are currently installed.
-
Sep 5th, 2009, 10:10 PM
#4
Thread Starter
New Member
Re: Product keys and the registry
According to your post, HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Products
Appears to be where I need to create a routine to scan and pull product keys that are currently installed on a machine. At least as a trial run.
Is this correct?
-
Sep 5th, 2009, 10:10 PM
#5
Re: Product keys and the registry
You'll need to figure out how each application stores it's keys and where. They obviously aren't going to be in plain alphanumeric characters. You'll need to figure out the encode their product keys.
Typically, you can match up the characters in the registry key with corresponding alphanumeric characters.
CodeBank contributions: Process Manager, Temp File Cleaner
 Originally Posted by SJWhiteley
"game trainer" is the same as calling the act of robbing a bank "wealth redistribution"....
-
Sep 5th, 2009, 10:12 PM
#6
Re: Product keys and the registry
According to your post, HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Products
Appears to be where I need to create a routine to scan and pull product keys that are currently installed on a machine.
Is this correct?
Yes. I actually made a loop with the help of some people on this site that loops through those keys and lists them in a ListView. I'll look for it and post the code.
CodeBank contributions: Process Manager, Temp File Cleaner
 Originally Posted by SJWhiteley
"game trainer" is the same as calling the act of robbing a bank "wealth redistribution"....
-
Sep 5th, 2009, 10:14 PM
#7
Re: Product keys and the registry
Here it is:
vb Code:
Public Sub UninstallPrograms() 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Products Dim SoftwareKey As String = "SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Products" Using rk As RegistryKey = Registry.LocalMachine.OpenSubKey(SoftwareKey) For Each skName In rk.GetSubKeyNames() Dim propertiesKey As RegistryKey = Registry.LocalMachine.OpenSubKey(SoftwareKey, False). _ OpenSubKey(skName, False). _ OpenSubKey("InstallProperties", False) Dim name = propertiesKey.GetValue("DisplayName", "<DisplayName not found>") Dim publisher = propertiesKey.GetValue("Publisher", "<Publisher not found>") Dim DisplayVersion = propertiesKey.GetValue("DisplayVersion", "<Display Version not found>") Dim installLocation = propertiesKey.GetValue("InstallLocation", "<InstallLocation not found>") propertiesKey.Close() Next End Using End Sub
CodeBank contributions: Process Manager, Temp File Cleaner
 Originally Posted by SJWhiteley
"game trainer" is the same as calling the act of robbing a bank "wealth redistribution"....
-
Sep 5th, 2009, 10:16 PM
#8
Thread Starter
New Member
Re: Product keys and the registry
Thanks much.
I'll use your code as a starting point.
I'll post back later if I make any headway. I would like to make something quite similar to that program I posted. It seems to have been done in C++ or VB.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|