5

我正在使用 wix 为 Outlook 插件创建引导程序。我必须在安装时检查 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>
4

1 回答 1

3

According to documentation Wix Toolset Documentation WixBundleAction is a BOOTSTRAPPER_ACTION that is available in Wix Bootstrapper.

And as answered here: Wix Installer Forum I think you can try something like this:

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

By having WixBundleAction = 3 inside condition clause, the condition will only be true for installation, and will be ignored during uninstall.

Hope this helps.

于 2013-10-11T16:08:18.757 回答