wix - 检查 wix Bootstrapper RegistrySearch bal :Condition only at time of installation

标签 wix wix3 bootstrapper

我正在使用 wix 为 Outlook 插件创建 bootstrap 。我只需要在安装时检查 Outlook 注册表搜索。我的以下检查在安装时运行良好。但是在我的插件安装之后,当有人卸载 Outlook 然后尝试卸载我的插件时,此注册表搜索检查也会在卸载时运行,这会导致卸载程序被阻止。 我必须仅在安装时运行这些 Outlook 注册表搜索检查 .我的支票如下:

<util:RegistrySearch  Variable="Outlook2013Present" Root="HKLM" Key="SOFTWARE\Microsoft\Office\15.0\Outlook\InstallRoot"   Value="Path" />
<util:RegistrySearch  Variable="Outlook2013Present64" Root="HKLM" Key="SOFTWARE\Microsoft\Office\15.0\Outlook\InstallRoot"   Value="Path" Win64="yes" />

<bal:Condition Message="This setup requires Outlook 2010 or 2013. Please install office and then run installer again ">
  Outlook2010Present OR Outlook2010Present64 OR Outlook2013Present OR Outlook2013Present64
</bal:Condition>

最佳答案

根据文档 Wix Toolset Documentation WixBundleAction 是一个 BOOTSTRAPPER_ACTION,可在 Wix Bootstrapper 中使用。

正如这里的回答:Wix Installer Forum我想你可以尝试这样的事情:

<bal:Condition Message="This setup requires Outlook 2010 or 2013. Please install office and then run installer again ">

      (Outlook2010Present OR Outlook2010Present64 OR Outlook2013Present OR Outlook2013Present64 ) OR WixBundleAction = 3

</bal:Condition>

通过拥有 WixBundleAction = 3在条件子句中,条件只在安装时为真,在卸载时将被忽略。

希望这可以帮助。

关于wix - 检查 wix Bootstrapper RegistrySearch bal :Condition only at time of installation,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19313323/

相关文章:

WiX - 将 InstallScope 从 perUser 切换到 perMachine

msbuild - 基于要在MSBUILD中使用的用户定义目录创建wix片段文件的最佳方法

Wix Bootstrapper list 或提升的自定义操作

installation - 如何打包两个 msi 文件并在它们之间运行条件?

wix - 如何使用 WiX 为关联文件设置图标?

c# - 为什么是 "C:\Windows\Microsoft.NET\assembly\GAC_32..."而不是 "C:\Windows\assembly\GAC_32"

WiX "Major Upgrade"不会在降级时完全安装应用程序

c# - 如何让 DirectoryModuleCatalog 工作?

windows - 如何根据目标机器(32 位或 64 位)使用 WiX 有条件地安装文件?

wix - 为什么在使用 Wix 安装后运行应用程序时出现 "and NOT installed"?