我正在使用 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/