WindowsBuild

The installer sets this variable to the Windows build number of the target system, as follows:

Product WindowsBuild value
Windows 95 950, 1111 (for OSR 2.5)
Windows 98 1998, 2222 (for Second Edition)
Windows Me 3000
Windows NT4 1381
Windows 2000 2195
Windows XP 2600
Windows XP Professional x64 3790
Windows Server 2003 3790
Windows Server 2003 R2 3790
Windows Vista 6000, 6001 (SP1), 6002 (SP2)
Windows Server 2008 6000, 6001 (SP1), 6002 (SP2)
Windows 7 7600, 7601 (SP1)
Windows Server 2008 R2 7600, 7601 (SP1)
Windows 8 8250 (Consumer Preview), 8400 (Release Preview), 9200 (RTM)
Windows Server 2012 9200
Windows 8.1 9600
Windows Server 2012 R2 9600
Windows 10 9400 and higher*
Windows Server 2016 9800-14393*
Windows Server 2019 17623 and higher*
Windows 11 22000 and higher*
Windows Server 2022 20348 and higher*

*The build numbers given for Windows 10 and its 2016 and 2019 Server counterparts include pre-release versions. Furthermore, due to Microsoft's new policy of "Windows as a service", each new public release has a different (higher) build number than the previous, while retaining the same 10.0 major.minor version number. Please consult online sources for the exact build number corresponding to a particular public release if you need to distinguish between them.

Usage

You can refer to it as <WindowsBuild>. In conditional expressions you can omit the brackets and use tests like (Version9X = 410) AND (WindowsBuild >= 2222). Do not set this variable directly; it is set automatically when the installer runs.

For Windows 10/11 and Server 2016-2022 the best way to check for a particular version is to use a combination of the following variables, one from each group:

  1. VersionNT, VersionNT32, VersionNT64 as required (Server editions are always x64, but Windows 10 may be 32-bit or x64)
  2. WindowsBuild if you need to distinguish between releases
  3. WindowsType, MsiNTProductType, or any of the other MsiNT... variables if you need to distinguish between product subtypes

For earlier Windows versions the build numbers are not the most reliable way to distinguish between various Windows editions. For them, it's better to use a combination of the following variables, one from each group:

  1. Version9X, VersionNT, VersionNT32, VersionNT64
  2. ServicePackLevel
  3. WindowsType, MsiNTProductType, or any of the other MsiNT... variables

Related topics

ServicePackLevel, ServicePackLevelMinor, Version9X, VersionNT, VersionNT32, VersionNT64, System information variables