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 (Consumer Preview) | 8250 |
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.
Note that the Windows build numbers are not the most reliable way to distinguish between various Windows editions. In general, it's better to use a combination of the following variables, one from each group:
- Version9X, VersionNT, VersionNT32, VersionNT64
- ServicePackLevel
- WindowsType, MsiNTProductType, or any of the other MsiNT... variables
Related topics
ServicePackLevel, ServicePackLevelMinor, Version9X, VersionNT, VersionNT32, VersionNT64, System information variables