Is it possible to have multiple condition (bal) for a wix bundle?

1.2k views Asked by At

I'm trying to manage .Net framework installation for different windows versions in an unique bundle.

For that, I want to have 2 different conditions with 2 specific messages which is more helpful than an unique message for multiple cases.

Basically, is there a way to make 2 conditions to work as in this code :

<?xml version="1.0" encoding="UTF-8"?>
...
<Bundle ...>
    <bal:Condition Message="Framework .Net 3.5 should be activated by default as a Windows feature for this version of Windows (7). Please (re)activate it.">Installed AND (VersionNT = 601) AND (NOT Netfx35Version)</bal:Condition>
    <bal:Condition Message="Framework .Net 3.5 must be manually activated as a Windows feature for this version of Windows (8).">Installed AND (VersionNT >= 602) AND (NOT Netfx35Version)</bal:Condition>
    <Chain>
        <ExePackage Cache="no" Compressed="yes" DetectCondition="Netfx35Version OR Netfx30Version" Id="Netfx30Redist" InstallCommand="/q /norestart /lang:ENU" InstallCondition="(NOT Netfx35Version AND NOT Netfx30Version) OR (NOT Netfx35Version AND  Netfx30Version AND Netfx30Version &lt; v3.0.4506.30)" PerMachine="yes" Permanent="yes" RepairCommand="/repair /q /norestart /lang:ENU" SourceFile="C:\Users\Bastien\ProjetsRiverside\WorkSpaceJava\Padeo\workdir\webclient\dotnetfx30.exe" UninstallCommand="/uninstal /q /norestart /lang:ENU" Vital="yes">
            <ExitCode Behavior="forceReboot" Value="3010"/>
        </ExePackage>
        <ExePackage InstallCommand="/q:a /c:&quot;msiexec /i vcredist.msi /qn&quot;" Permanent="yes" SourceFile="C:\Users\Bastien\ProjetsRiverside\WorkSpaceJava\Padeo\workdir\webclient\vcredist_x86_2005.exe"/>
        <MsiPackage Permanent="yes" SourceFile="C:\Users\Bastien\ProjetsRiverside\WorkSpaceJava\Padeo\workdir\webclient\PSC-10.2B.msi" Visible="yes"/>
        <MsiPackage SourceFile="C:\Users\Bastien\ProjetsRiverside\WorkSpaceJava\Padeo\workdir\files\XPower\Test102B\1\output\XPower.Test102B.msi" Visible="yes"/>
    </Chain>
    <util:RegistrySearchRef Id="SearchForNet35"/>
    <util:RegistrySearchRef Id="SearchForNet3"/>
</Bundle>

Thank you.

1

There are 1 answers

0
Jozef Izso On BEST ANSWER

We build our installer using WiX 3.10 toolset and it does support multiple bal:Condition elements for a Bundle.