WIX - 安装时的自定义操作,但不适用于卸载或升级

Lex*_*Lex 8 wix

我有一个wix安装程序,我们运行了几个自定义操作,比如注册等.但是我们只希望这些在安装上运行,而不是在升级或卸载时运行.

我已经尝试将其设置为NOT Installed AND REINSTALL,但这也不起作用.

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

 <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>
Run Code Online (Sandbox Code Playgroud)

编辑:添加了我的自定义动作序列.

Chr*_*ris 15

NOT Installed AND REINSTALL在同一时间永远不可能是真的.这意味着应用程序未安装但目前正在重新安装.那会怎么样?

使用此条件来安排自定义操作:

NOT Installed AND NOT UPGRADINGPRODUCTCODE

这可以防止在重大升级时触发它.