【问题标题】:Is it possible to have multiple condition (bal) for a wix bundle?蜡包是否可以有多个条件(bal)?
【发布时间】:2014-01-15 17:00:00
【问题描述】:

我正在尝试在一个独特的捆绑包中管理不同 Windows 版本的 .Net 框架安装。

为此,我希望有 2 个不同的条件和 2 条特定消息,这比针对多种情况的唯一消息更有帮助。

基本上,有没有办法让 2 个条件像这段代码一样工作:

<?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>

谢谢。

【问题讨论】:

    标签: .net wix wix-extension wix3.8


    【解决方案1】:

    我们使用 WiX 3.10 工具集构建我们的安装程序,它确实支持 Bundle 的多个 bal:Condition 元素。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-11-01
      • 2020-05-15
      • 1970-01-01
      • 1970-01-01
      • 2020-02-15
      • 1970-01-01
      • 2013-02-03
      • 1970-01-01
      相关资源
      最近更新 更多