WiX Installer failed to parse condition

2

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 &gt;= v6.1) AND NOT (Net4FullVersion &gt;= 4.5)" />
    <MsiPackage Id="MainPackage" SourceFile="SampleFirst.msi" InstallCondition="VersionNT &gt;= 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.
xml
parsing
wix
conditional-statements
asked on Stack Overflow Jun 23, 2014 by Kyle • edited Jun 23, 2014 by Kyle

2 Answers

3

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 >= &quot;4.5&quot;)" />
answered on Stack Overflow Jun 23, 2014 by Rob Levine • edited Jun 23, 2014 by Rob Levine
1

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.

answered on Stack Overflow Jun 23, 2014 by Bob Arnson

User contributions licensed under CC BY-SA 3.0