【发布时间】:2012-03-21 01:25:48
【问题描述】:
我有一个 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应该没问题(我假设您的代码中没有拼写错误)。请在您实际安排自定义操作的位置显示您的InstallExecuteSequence。 -
添加了代码示例,我们通常将其设置为未安装,但这似乎不起作用,因为它仍在升级时运行自定义操作
-
你有日志文件来分析你的条件工作的价值吗?
标签: wix