【问题标题】:Check wix Bootstrapper RegistrySearch bal:Condition only at time of installation检查 wix Bootstrapper RegistrySearch bal:Condition only at the time of installation
【发布时间】:2013-10-11 08:10:28
【问题描述】:

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

【问题讨论】:

    标签: wix wix3 bootstrapper


    【解决方案1】:

    根据文档Wix Toolset DocumentationWixBundleAction 是一个 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,该条件仅在安装时为真,在卸载时将被忽略。

    希望这会有所帮助。

    【讨论】:

    • 哦,谢谢 URB。在我毁掉了开斋节假期后,你为我找到了解决这个糟糕问题的方法,让我度过了愉快的一天。非常感谢。这是你送给我的开斋节礼物。
    猜你喜欢
    • 1970-01-01
    • 2022-12-01
    • 1970-01-01
    • 1970-01-01
    • 2022-12-02
    • 2017-03-25
    • 2021-01-29
    • 2022-12-01
    • 1970-01-01
    相关资源
    最近更新 更多