根据模式-WIX执行自定义操作
|
我们已经为我们的应用程序创建了WIX安装程序。我们面临的问题是:
我们定义了在以下情况下要执行的两个不同的自定义操作(例如ActionForInstall和ActionForUninstall):
ActionForInstall:应该在安装,产品升级,维护模式(用于修复和修改)时运行
ActionForUninstall:应该仅在卸载时运行。
但是我们无法设置适当的条件。您可以参考代码:
<Custom Action=ActionForInstall After=\'InstallFinalize\' >
(NOT Installed) OR (Installed AND ((MaintenanceMode = \"Modify\") OR (MaintenanceMode = \"Repair\")) AND (NOT (MaintenanceMode = \"Remove\"))) OR ((UPGRADINGPRODUCTCODE) AND NOT(REMOVE ~= \"ALL\"))
</Custom>
<Custom Action=ActionForUninstall Before=\'InstallFinalize\'>
Installed AND NOT UPGRADINGPRODUCTCODE
</Custom>
请让我们知道我们做错了什么。上面的代码甚至调用InstallFinalize进行卸载。
没有找到相关结果
已邀请:
2 个回复
坝镰补翔奋
ActionForUninstall
掏得透垦滩