9

Using C#, how can I get the Windows build number or OS Build number as shown in the About window? This is different from the version number: for Windows 10 Creator Update, the Build Number would be 1703 and the OS Build would be 15063.296.

I can't find anything relevant in Environment.OSVersion and this linked question (Getting Windows OS version programmatically) is only about getting the version number (10 in this case)

enter image description here

divibisan
  • 11,659
  • 11
  • 40
  • 58
Francois
  • 10,730
  • 7
  • 47
  • 80
  • 1
    https://stackoverflow.com/questions/37700605/getting-windows-os-version-programmatically – CodeCaster Jun 09 '17 at 10:53
  • 2
    Windows build number in your example - 15063. 1703 - this is *ReleaseId* 296 is *UBR* (*Update Build Revision*). look for *RtlGetVersion* and `HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion` key – RbMm Jun 09 '17 at 12:04
  • Why do you think you need this information? An app should not *ever* need to know the build number of the OS. – Cody Gray - on strike Jun 09 '17 at 12:25
  • 2
    We encounter BSOD with this build of Windows. – Francois Jun 09 '17 at 20:59
  • 1
    I'm voting to reopen this question since this question is about the Windows 10 version (eg "1703") whereas the related question is about getting the major and minor version (eg "10.0"). – Sam Jul 29 '18 at 23:19

1 Answers1

-3

The following gets the Build number:

Environment.OSVersion.Version.Build
Abhishek
  • 2,925
  • 4
  • 34
  • 59