7

I am asking about those two registry keys:

Screenshot of regedit

Both seem to contain the Windows 10 build number (10240 for RTM/TH1, 10586 for 1511/TH2).

Is there any (documented) difference between those two? Which one should I use to determine the "Version" of Windows 10?


Footnote: I am aware that usually checking for required features is better practice than checking version numbers. Note, however, that there are legitimate cases for wanting to get the version of the currently running OS, which I'll gladly discuss in the comments, if needed.

Heinzi
  • 167,459
  • 57
  • 363
  • 519
  • 1
    I am going to guess that the "Number" key was _supposed_ to be REG_DWORD with the numeric value of 10586 (or whatever), but they both ended up being identical Type/Data REG_SZ/10586. – franji1 Sep 09 '16 at 16:04
  • 1
    Just a note: If installed mayor updates are important you can get this part from the `UBR` (Update Build Revision) key. Together with the `CurrentVersionNumber` they provide the "OS build" which can be found in [MS Release list](https://technet.microsoft.com/en-us/windows/release-info) – Simon Sobisch Mar 01 '17 at 07:45
  • 3
    Just a note: `CurrentVersionNumber`, `CurrentVersion` and `UBR` are at least available since Windows 7. Windows 10 only added `ReleaseId` showing 1511 in the given sample. – Simon Sobisch Mar 01 '17 at 08:11
  • 1
    Note: on Windows NT 4.0 SP6, these two values are not the same. https://imgur.com/a/GZV3F8a – Frank Lesniak Jan 20 '21 at 06:22
  • Follow up: the same seems to be true of 2000, XP, and WS2003 / XPx64 -- CurrentBuild is marked as "obsolete data - do not use", whereas CurrentBuildNumber has the build number configured. Things changed in Vista/WS2008. – Frank Lesniak Jan 20 '21 at 06:53

1 Answers1

1

I figure it out. I did some "hack"

I changed the value of CurrentBuild key to another value, then I opened winver.exe and I saw that the new value I typed in CurrentBuild key was shown by winver.exe

enter image description here

So there is no documentation but with a little help of reverse engineering and trial and error you get the answer :)

So CurrentBuild key is what winver.exe is looking for as the build number and I assume that you should do the same.

gil123
  • 512
  • 6
  • 12