Wix-卸载时运行批处理文件

时间:2019-01-21 06:15:23

标签: wix installer uninstall

因此,此CustomAction仅适用于RunBatch ID(在完成安装之前运行)。但这对卸载无效,我错过了吗?

<CustomAction Id="RunBatch" ExeCommand="[INSTALLFOLDER]Tester.bat" Directory="INSTALLFOLDER" Execute="deferred" Return="asyncWait" />
<CustomAction Id="Uninstall" ExeCommand="[INSTALLFOLDER]Tester.bat"  Directory="INSTALLFOLDER" Execute="deferred" Return="asyncNoWait"/>
<InstallExecuteSequence>
    <Custom Action="RunBatch" Before="InstallFinalize">NOT Installed</Custom>
    <Custom Action="Uninstall" Before="RemoveFiles">Installed</Custom>
</InstallExecuteSequence>

当我从安装程序甚至控制面板运行“卸载”时,批处理文件仍未运行...

1 个答案:

答案 0 :(得分:0)

更改后我将其修复

<Custom Action="Uninstall" Before="RemoveFiles">Installed</Custom>

<Custom Action="Uninstall" After="InstallInitialize">(NOT UPGRADINGPRODUCTCODE) AND (REMOVE="ALL")</Custom>