卸载开始前如何执行程序? [英] How to execute program before the uninstallation starts?
问题描述
InnoSetup可以在卸载开始之前执行程序吗?我的程序创建了一些注册表值.我有一个可执行文件,可以删除那些注册表值,我的问题是,InnoSetup可以在卸载开始前运行该可执行文件吗?
Can InnoSetup execute a program before the uninstallation starts? My program creates some registry values. I have an executable that can remove those registry values and my question is, can InnoSetup run that executable before the uninstallation starts?
推荐答案
请参见Setup Script Sections
上的文档,尤其是UninstallRun
在树底的一个:
See the documentation on Setup Script Sections
, particularly the UninstallRun
one at the bottom of the tree:
[UninstallRun]
Filename: "{app}\INIT.EXE"; Parameters: "/x"
如果您需要做更复杂的事情,也可以使用InnoSetup中的Pascal脚本功能在代码中完成.参见UninstallCodeExample1.iss' in the
InnoSetup 5 \ Examples`文件夹.
If you need to do something more complex, you can also do it in code using the Pascal scripting functionality in InnoSetup. See UninstallCodeExample1.iss' in the
InnoSetup 5\Examples` folder.
这篇关于卸载开始前如何执行程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!