Link to home
Start Free TrialLog in
Avatar of jkaios
jkaiosFlag for Marshall Islands

asked on

Windows Product Key

Is there anybody here can help me how to get/retrieve the "Windows Product Key" in code?

FYI: There is a freeware called "Magical Jelly Bean Keyfinder" that shows the Windows Product Key as well as the product key for Office.  I would like to do that using Visual Basic 6.

Thanks
jk
ASKER CERTIFIED SOLUTION
Avatar of Shane Russell
Shane Russell
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jkaios

ASKER

Thank you gents.  Both of you saved my life!

Again, thanks a lot!!!
jk
Avatar of jkaios

ASKER

Hello experts,

Sorry, I forgot just one more additional question to this:  How can I accomplish this technique on a "remote" machine?

Thanks again for your help.
why would you want to do this from a remote machine ( Sounds a bit dodgy like you are trying to get other peoples keys that dont belong to you or something ) ??
Avatar of jkaios

ASKER

Well, I have just created a "Network Auditing Tool" that scans all computers on my network for auditing purposes. The data that my program collects are: MachineName, Description, IPAddress, OS,SP, DateInstalled, DomainRole, CurrentUser, SystemModel, BIOSInfo, Processor, Memory, Printers, NIC, Video, SCSI, etc. using WMI.

The only thing I was looking for was how to get the "CD-key" so that I can maintain a list of what XP Product Keys I have used and what I have NOT used.

Anyways, thanks for your help. I found how to do it using the "RegConnectRegistry" API
egl1044's version is more elegant by the looks of it with its copymemory API / function or library or whatever it is etc :)