我正在尝试在一个唯一的捆绑包中管理不同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 < v3.0.4506.30)" PerMachine="yes" Permanent="yes" RepairCommand="/repair /q /norestart /lang:ENU" SourceFile="C:UsersBastienProjetsRiversideWorkSpaceJavaPadeoworkdirwebclientdotnetfx30.exe" UninstallCommand="/uninstal /q /norestart /lang:ENU" Vital="yes">
<ExitCode Behavior="forceReboot" Value="3010"/>
</ExePackage>
<ExePackage InstallCommand="/q:a /c:"msiexec /i vcredist.msi /qn"" Permanent="yes" SourceFile="C:UsersBastienProjetsRiversideWorkSpaceJavaPadeoworkdirwebclientvcredist_x86_2005.exe"/>
<MsiPackage Permanent="yes" SourceFile="C:UsersBastienProjetsRiversideWorkSpaceJavaPadeoworkdirwebclientPSC-10.2B.msi" Visible="yes"/>
<MsiPackage SourceFile="C:UsersBastienProjetsRiversideWorkSpaceJavaPadeoworkdirfilesXPowerTest102B1outputXPower.Test102B.msi" Visible="yes"/>
</Chain>
<util:RegistrySearchRef Id="SearchForNet35"/>
<util:RegistrySearchRef Id="SearchForNet3"/>
</Bundle>
谢谢。
我们使用WiX 3.10工具集构建安装程序,它确实支持Bundle
的多个bal:Condition
元素。