卸载程序时,我们希望在卸载前做一些清理善后操作。
卸载事件函数
innosetup为我们提供了,卸载事件函数,卸载支持以下事件函数:
InitializeUninstall()
function InitializeUninstall(): Boolean;
Return False to abort Uninstall, True otherwise.
返回False中止卸载,返回True继续卸载。
InitializeUninstallProgressForm()
procedure InitializeUninstallProgressForm();
Use this event function to make changes to the progress form at startup. You can't use the InitializeUninstall event function for this since at the time it is triggered, the progress form does not yet exist.
使用此事件函数可在启动时更改进度窗体。不能为此使用InitializeUninstall事件函数,因为在触发该事件时,进度窗体尚不存在。
procedure DeinitializeUninstall();
取消卸载的函数
function UninstallNeedRestart(): Boolean;
Return True to instruct Uninstall to prompt the user to restart the system at the end of a successful uninstallation, False othe