Windows CD Key

jonnybinthemix

New member
Local time
Today, 11:08
Joined
Oct 13, 2004
Messages
5
Hi guys,

I am currently writing a Database to help me carry out Software and Hardware Audits at work. I want the database to pull the Windows CD Key from the machine i run it on and store it under the table for cd keys, so that on my database i can just press a button and it puts the cd key in the relevent box.

I used to run a program called jelly bean and then paste the cd key into the database, but if jelly bean can pull the cdkey from the registry, why cant my database!!

when i search the registry for the cd key all i can find is Product ID, this is not the Cd Key, this is a load of numbers, i need the full cd key that you install windows with. i need this so that i can keep a track of windows lisences etc.

Can anyone help?

thank you

Jon
 
First, the routine you need is, I think, GetSetting. Look it up in the help files before you use it. From there you can find out other information you might need like how to change a key or remove it (not recommended from VBA unless you really REALLY understand registry information).

Second, try this key: (I'll break it up so it won't be so ugly on the line)
MyComputer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\{more...}

Under the Microsoft sub-hive, you have to find the key-name that matches your version of Windows. For example, if it is Windows NT, then the rest of that key (taking the place of {more}) might be

...\Windows NT\CurrentVersion\ProductId

This key returns an encoded string. The MS internal codes include some digits that are part of the Product Version info (even though there is a separate key for a thing called Plus!VersionNumber). There is another field in the key that is somehow related to the build information. But at least for my system, the product serial number was embedded in the middle of that very long string. In my case, the key had 5 extra digits in front and 5 more extra digits in back of the actual serial number.

This might not be the actual number from your certificate, but the serial number on my product box was in that key. By the way, it is all run together, no punctuation or spaces inside the key string even though a string could indeed have such extra characters.

Where I work, the central office keeps the actual certificates once the product has been installed, so I can't verify that the serial number and the certificate number are the same. But tracking serial numbers from the box ought to be at least as good as the certificate number as long as no one cheats by installing the same certificate number on multiple systems.
 

Users who are viewing this thread

Back
Top Bottom