I am trying to create a WiX installer that makes sure the user is on Windows 7 and doesn't already have .NET Framework 4.5 installed. Below is both the error code and the XML/WXS Code in the bundle. I'm at a loss as to why it doesn't understand this unless its all the parentheses. But, without them it doesn't understand what NOT is.
Code:
<Chain>
<ExePackage Id="PrePackage" SourceFile="dotNetFx45_Full_Setup.exe" InstallCondition="(VersionNT >= v6.1) AND NOT (Net4FullVersion >= 4.5)" />
<MsiPackage Id="MainPackage" SourceFile="SampleFirst.msi" InstallCondition="VersionNT >= v6.1" />
</Chain>
Error:
[0A20:0954][2014-06-23T12:07:14]e000: Error 0x8007000d: Failed to parse condition "(VersionNT >= v6.1) AND NOT (Net4FullVersion >= 4.5)". Unexpected character at position 49.
Having experimented locally, it looks like the Net4FullVersion needs to have its version number quoted; which means in your case the quotes will have to be escaped:
<ExePackage Id="PrePackage" SourceFile="dotNetFx45_Full_Setup.exe" InstallCondition="(VersionNT >= v6.1) AND NOT (Net4FullVersion >= "4.5")" />
Versions in Burn are distinct from strings and numbers, unlike how Windows Installer handles versions. That means you need to use the "v" prefix, as in VersionNT >= v6.1
.
User contributions licensed under CC BY-SA 3.0