Windows serial number

Is there any way to get the Windows serial # under Win 3.1 - 98 and NT?  Is this serial number unique to the machine even if the same disk is used to install Windows?  It has to work under MSVC++ v1.52.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

> Is this serial number unique to the machine even if the
 > same disk is used to install Windows?  


..B ekiM
The Windows key is stored in the Registry, in HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\ProductKey

In Windows 3.1, I honestly don't remember where the key is stored. You can use the Windows API to access the Registry, RegLoadKey() if I remember correctly.

The product key is not unique to the machine or even the disc used to install it. The key is printed on the "getting started" book that comes with Windows. You can use any key with any CD on any machine, as long as the key is for that version of Windows (a key for Windows 95 will NOT work with Windows 98.)


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
archimedesAuthor Commented:
I was talking about the number in HKEY_LOCAL_MACHINE\...\ProductId. (The same number that appears on the General tab of the System Properties dialog box)
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.