我正在尝试在一个独特的捆绑包中管理不同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:\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:"msiexec /i vcredist.msi /qn"" 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>
谢谢。
答案 0 :(得分:0)
我们使用WiX 3.10工具集构建安装程序,它支持bal:Condition
的多个Bundle
元素。