因此,此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>
当我从安装程序甚至控制面板运行“卸载”时,批处理文件仍未运行...
答案 0 :(得分:0)
更改后我将其修复
<Custom Action="Uninstall" Before="RemoveFiles">Installed</Custom>
到
<Custom Action="Uninstall" After="InstallInitialize">(NOT UPGRADINGPRODUCTCODE) AND (REMOVE="ALL")</Custom>