我有一个wix安装程序,我们在其中运行了几个自定义操作,例如注册等。但是,我们只希望它们在安装程序上运行,而不是在升级或卸载程序上运行。

我试着将其设置为“未安装并重新安装”,但是这也不起作用。

想要通过自定义操作仅在安装时而不是在升级或卸载时运行某些应用程序时,有人知道正确的属性是什么吗?

 <InstallExecuteSequence>
     <Custom Action="PosConfig.CustomAction" Before="StartServices"><![CDATA[NOT Installed AND NOT UPGRADINGPRODUCTCODE AND UILevel>3]]></Custom>
     <Custom Action="Register.CustomAction" After="PosConfig.CustomAction">NOT Installed AND NOT UPGRADINGPRODUCTCODE </Custom>
     <Custom Action="OPOSSelectorFirst.CustomAction" After="Register.CustomAction"><![CDATA[NOT Installed AND NOT UPGRADINGPRODUCTCODE AND &ProductFeature=3 AND Not OPOSDLLINSTALLED]]></Custom>
     <Custom Action="OPOSSelectorUpdate.CustomAction" After="OPOSSelectorFirst.CustomAction"><![CDATA[NOT Installed AND NOT UPGRADINGPRODUCTCODE AND &ProductFeature=3 AND Not OPOSDLLINSTALLED]]></Custom>
  </InstallExecuteSequence>

编辑:添加了我的自定义操作序列。

最佳答案

NOT Installed AND REINSTALL永远不能同时为true。这意味着该应用程序尚未安装,但当前正在重新安装。那将如何工作?

通过使用以下条件来安排您的自定义操作:
NOT Installed AND NOT UPGRADINGPRODUCTCODE
这样可以防止在重大升级时触发它。

关于WIX-在安装时执行自定义操作,但在卸载或升级时不执行,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/9535047/

10-13 07:57
查看更多