【发布时间】:2020-11-24 10:49:03
【问题描述】:
我正在使用 Wix Bootstrapper,并希望通过 .msi 包安装一些应用程序以及我的主应用程序。这些应用程序可能已经安装在目标 PC 中,因此我需要先检测这些应用程序,如果它们已经安装则跳过安装。此外,在卸载过程中,不应卸载这些应用程序,因为 Wix Bootstrapper 并未安装它们。
我尝试使用 InstallCondition 属性,但(如预期的那样)如果检测到应用程序已安装,它会卸载。
我的 Bundle.wxs 看起来像这样:
...
<Bundle>
<util:FileSearch Id='CheckApplicationX' Path='[ProgramFilesFolder]ApplicationX\ApplicationX.exe' Variable='ApplicationXFile' Result='exists' />
<Chain DisableRollback="yes">
...
<MsiPackage Id="InstallApplicationX" Vital="yes" Compressed="yes" DisplayInternalUI="no" EnableFeatureSelection="no" SourceFile="..\application-x.msi" Name="Application X" DisplayName="Application X" ForcePerMachine="yes" InstallCondition="NOT ApplicationXFile" />
...
</Chain>
</Bundle>
...
感谢任何帮助/提示!
【问题讨论】:
标签: installation wix uninstallation bootstrapper burn