Windows serial number

Posted on 2000-02-08
Medium Priority
Last Modified: 2010-04-02
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.
Question by:archimedes
LVL 11

Expert Comment

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


..B ekiM

Accepted Solution

TheSnowman earned 300 total points
ID: 2502933
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.)


Author Comment

ID: 2507810
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)

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

588 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question