'Wix Windows 8 Launch Condition
I am working on a Wix installer to support Windows 7 SP1, Windows 8 and higher. I can successfully verify Windows 7 with Service Pack 1, however my windows 8 launch condition continually fails. My stripped back condition for windows 8 is,
<bal:Condition Message="Windows 8 or higher supported...."><![CDATA[Installed OR VersionNT >= 602]]></bal:Condition>
Log Entry
[0638:0D20][2015-08-28T07:47:17]i001: Burn v3.9.1208.0, Windows v6.3 (Build 9600: Service Pack 0)
[0638:0D20][2015-08-28T07:47:18]i052: Condition 'Installed OR VersionNT >= 602' evaluates to false.
Am i using the wrong syntax for windows8 or wrong versionNt code?
Solution 1:[1]
The condition must evaluate to true for the install to proceed, so it's not clear why you have Installed as part of the condition. What does Installed refer to in your sample?
Also, you are using the wrong syntax for VersionNT. You're using the Windows Installer format, but Burn uses a different format:
http://wixtoolset.org/documentation/manual/v3/bundle/bundle_built_in_variables.html
It may also matter if you don't use the right property (VersionNT64 instead).
Solution 2:[2]
As mentioned the version numbering used by Burn bundles is a different format to the MSI (Wix documentation here).
VersionNT - version value representing the OS version. The result is a version variable (v#.#.#.#) which differs from the MSI Property 'VersionNT' which is an integer. For example, to use this variable in a Bundle condition try: "VersionNT > v6.1".
VersionNT64 - version value representing the OS version if 64-bit. Undefined if running a 32-bit operating system. The result is a version variable (v#.#.#.#) which differs from the MSI Property 'VersionNT64' which is an integer. For example, to use this variable in a Bundle condition try: "VersionNT64 > v6.1".
The values required for Burn bundle are listed here (Windows Documentation)
| Operating system | Version number |
|---|---|
| Windows 11 | 10.0* |
| Windows 10 | 10.0* |
| Windows Server 2022 | 10.0* |
| Windows Server 2019 | 10.0* |
| Windows Server 2016 | 10.0* |
| Windows 8.1 | 6.3* |
| Windows Server 2012 R2 | 6.3* |
| Windows 8 | 6.2 |
| Windows Server 2012 | 6.2 |
| 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 |
Example usage:
<!-- Check OS is Win7 (6.1) or Win8.1 (v6.3) or higher - 32bit and 64bit checks -->
<bal:Condition Message="Required OS is Win7, 8.1 or higher">
<![CDATA[Installed OR (VersionNT = v6.1) OR (VersionNT >= v6.3) OR (VersionNT64 = v6.1) OR (VersionNT64 >= v6.3)]]>
</bal:Condition>
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | |
| Solution 2 | Morphed |
