WiX Bundle Issue

PTNL

Supreme [H]ardness
Joined
Jan 2, 2005
Messages
4,199
I'm working on a WiX bundle project in Visual Studio 2012 with WiX (v3.7), and need to set install conditions for the generated EXE bootstrap installer. So far I have:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
     xmlns:bal="http://schemas.microsoft.com/wix/BalExtension"
     xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">

<Bundle Name="MyApplicationName"
        Version="1.0"
        Manufacturer="MyCompanyName"
        UpgradeCode="GuidGoesHere"
        IconSourceFile="App.ico"
        Copyright="2011">

    <BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.RtfLicense">
        <bal:Condition Message="This application is only supported on machines running Windows 7 x64.">
            <![CDATA[VersionNT64 >= 601]]>
        </bal:Condition>
            
        <bal:WixStandardBootstrapperApplication LicenseFile="license.rtf" 
                                                SuppressOptionsUI="yes" 
                                                LogoFile="Logo.png" />
    </BootstrapperApplicationRef>

( ... )


The problem I am having is around line 13, where I set the installation condition. The error returned is this:
Code:
Error	24	The BootstrapperApplicationRef element contains an unexpected child element 'bal:Condition'.


Some initial Google-ing pointed to:
1) add "WixBalExtension" exists as a resource to the bundle project,
2) add the namespace ref for "bal" and set it to the correct schema definition, and
3) ensure that the WixBalExtension.dll is referenced in the compile command.

Removing the "bal:Condition" node does allow the installer to build successfully -- albeit without the operating system inspection. Intellisense does give the "Condition" option when you start typing "bal:" within the "BootstrapperApplicationRef" node, as well as the "Message" attribute.

... Suggestions?
 
Last edited:
Figured it out.

I had two problems with the above code snippet:

1 - The condition clause used an incorrect value. I have recently been porting a normal WiX project into a bundle, and copy/pasted the same OS condition value from the old project. Some searching revealed that the compare values in "burn" are slightly different. So I had to change "601" to "v6.0".

2 - There *may* be a bug with v3.7 of WiX -- either with the compile parsing, or with Intellisense. Using the "bal:Condition" node with the corrected value noted above still throws a build error. However, the "Bundle" node also has a "Condition" attribute that can use the same value. Removing the "bal:Condition" node and adding the "Condition" attribute to the "Bundle" node allowed the build to succeed and properly enforced the operating system check. I will see if this is a legitimate (and known) bug in the WiX forums.
 
I will see if this is a legitimate (and known) bug in the WiX forums.
Received a response from the WiX team on this. They state it is either a missing feature in (or a limitation of) the schema Intellisense.
 
Back
Top