Wix - 运行 卸载时的批处理文件
Wix - Run Batch File on Uninstall
因此此 CustomAction 仅适用于 运行 批次 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>
当我运行从安装程序甚至控制面板卸载时,批处理文件仍然没有运行...
我修改后修复它
<Custom Action="Uninstall" Before="RemoveFiles">Installed</Custom>
至
<Custom Action="Uninstall" After="InstallInitialize">(NOT UPGRADINGPRODUCTCODE) AND (REMOVE="ALL")</Custom>
因此此 CustomAction 仅适用于 运行 批次 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>
当我运行从安装程序甚至控制面板卸载时,批处理文件仍然没有运行...
我修改后修复它
<Custom Action="Uninstall" Before="RemoveFiles">Installed</Custom>
至
<Custom Action="Uninstall" After="InstallInitialize">(NOT UPGRADINGPRODUCTCODE) AND (REMOVE="ALL")</Custom>