您好,我希望我的Inno安装程序脚本在尝试使用卸载程序之前,先检测程序的安装程序是否正在运行unins000.exe
。
如果在用户尝试卸载程序时我的程序的安装程序已经在运行,则卸载程序应通过弹出一个消息框(如Setup is running. Please install using it before uninstalling. Really want to Continue?
和,带有两个按钮Yes
和)来警告用户No
。
如果用户按No
,则必须关闭卸载程序(unins000.exe)。
如果用户按下Yes
,则卸载程序(unins000.exe)必须终止程序的安装程序(Setup.exe)的进程,然后继续进行卸载。
如何在没有任何不稳定的情况下执行此操作?
感谢您的帮助。
无法彻底中止安装。我不会试图杀死它。让它完成。
[Setup]
SetupMutex=MySetupsMutexName
[Code]
function InitializeUninstall(): Boolean;
begin
while CheckForMutexes('MySetupsMutexName') then
begin
MsgBox('Installer is still running', mbError, MB_OK);
end;
end;
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句