卸载后执行命令
我需要卸载才能在删除已安装的文件之后运行命令。 [UninstallRun] 没有用,据我所知,它在文件被删除之前运行。 我有点需要一个“卸载后”标志。
关于我如何实现上述目标有什么建议吗?
I need my uninstall to run a command after it's removed the files it has installed.
[UninstallRun] is no use as I understand it runs BEFORE files are removed.
I kind of need a "postuninstall" flag.
Any suggestions as to how I can accomplish the above?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
请参阅文档中的“卸载事件函数”。您可以使用例如
CurUninstallStepChanged
当“CurUninstallStep”为“usPostUninstall”时。See "Uninstall Event Functions" in the documentation. You can use for instance
CurUninstallStepChanged
when 'CurUninstallStep' is 'usPostUninstall'.同样,还有一个 [Run] 部分,Inno 允许您定义一个 [UninstallRun] 部分指定卸载时应执行安装程序包的哪些文件。
例如:
或者,@Sertac Akyuz 提出的解决方案利用事件函数,可用于调整更多的卸载操作。以下是 CurUninstallStepChanged 函数以及其他相关函数的使用示例。
https://github.com/HeliumProject/InnoSetup/blob/master/Examples /UninstallCodeExample1.iss
In the same way there is a [Run] section, Inno allows to you to define an [UninstallRun] section to specify which files of your Installer package should be executed on unistall.
For example:
Alternatively, solution proposed by @Sertac Akyuz, which makes use of event functions can be used for tunning a bit more unistalling actions. Here is an example of the usage of CurUninstallStepChanged function among other related functions.
https://github.com/HeliumProject/InnoSetup/blob/master/Examples/UninstallCodeExample1.iss