【发布时间】:2018-06-18 15:10:48
【问题描述】:
我有一个将文件添加到安装目录的自定义操作。卸载程序时,另一个自定义操作会尝试删除这些文件,以便可以删除安装目录。
问题是我的自定义卸载操作在删除标准安装文件之后运行,因此安装目录保留在那里,尽管它是空的。
配置看起来像这样:
<CustomAction Id="AddFilesAction" BinaryKey="installerActions" DllEntry="AddFiles" Execute="deferred" Return="check" Impersonate="no" />
<CustomAction Id="CleanupAction" BinaryKey="installerActions" DllEntry="Cleanup" Execute="deferred" Return="check" Impersonate="no" />
<InstallExecuteSequence>
<Custom Action="CleanupAction" Before="InstallFiles">Installed</Custom>
<Custom Action="AddFilesAction" After="InstallFiles">NOT Installed</Custom>
</InstallExecuteSequence>
我可以在 msi 开始删除安装文件之前让CleanupAction 运行,这样自定义文件已经被删除并且 msi 可以删除主安装目录吗?
【问题讨论】:
标签: installation wix windows-installer wix3.7