Search code examples
c++windowsoperating-systemversionwindowsversion

Translating GetVersionEx numbers into OS name


I have this list :

2.5.1.2600
2.5.2.3790
2.6.0.6000
2.6.0.6001
2.6.0.6002
2.6.1.7600
2.6.1.7601

That's a list of window versions, info comes from GetVersionEx, the numbers are:

dwPlatformId.dwMajorVersion.dwMinorVersion.dwBuildNumber

And I want to know the Windows version name for those numbers, for example: "Win XP SP2"

I tried googling but i find different information, in someplaces a number is for XP SP2 and in others the same is SP3.

I can identify 5.0 as Win 2000, 5.1 as XP, etc. But I also want the SP version and if it's Pro or Home version, I think dwBuildNumber contains that information.

Does someone knows how to translate the numbers to version name?


Solution

  • You can find a list here or here:

    Windows 7                   6.1
    Windows Server 2008 R2      6.1
    Windows Server 2008         6.0
    Windows Vista               6.0
    Windows Server 2003 R2      5.2
    Windows Server 2003         5.2
    Windows XP 64-Bit Edition   5.2
    Windows XP                  5.1
    Windows 2000                5.0