如何等待卸载程序完成?
使用 NSIS,我想启动卸载程序并等待其完成,然后再继续安装程序。问题是卸载程序立即返回,即使我使用的是 ExecWait。
我在这里看到了这个页面: http://nsis.sourceforge.net/When_I_use_ExecWait,_it_doesn%27t_wait< /a> 其中提到了为什么会发生这种情况,然后提供了一些建议,但我无法让我的工作正常工作。
我正在尝试的代码是:
ExecWait '"C:\path\to\uninstall.exe" /NCRC' $0
MessageBox MB_OK "uninstaller returned $0"
在启动卸载程序的同时,显示消息框显示“卸载程序返回 0”。有人解决这个问题吗?
谢谢
Using NSIS, I want to launch an uninstaller and wait for it to finish before proceeding with my installer. The problem is the uninstaller is returning immediately, even though I'm using ExecWait
.
I saw this page here: http://nsis.sourceforge.net/When_I_use_ExecWait,_it_doesn%27t_wait which mentions why it's happening, and then offers some suggestions, but I can't get mine to work.
The code I'm trying is:
ExecWait '"C:\path\to\uninstall.exe" /NCRC' $0
MessageBox MB_OK "uninstaller returned $0"
Which shows the message box displaying "uninstaller returned 0" at the same time the uninstaller is launched. Has anyone gotten around this?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您链接到的页面一般讨论 ExecWait,但它也链接到 当我使用 ExecWait 卸载程序时。 exe 它不会等待卸载程序,这是您正在寻找的 NSIS 特定信息( _?=c:\theinstalldir 告诉 nsis 卸载程序不要将自身复制到 %temp% 并执行新的(非等待)复制到那里)
The page you linked to talks about ExecWait in general, but it also links to When I use ExecWait uninstaller.exe it doesn't wait for the uninstaller, that is the NSIS specific info you are looking for ( _?=c:\theinstalldir tells nsis uninstaller not to copy itself to %temp% and execute a new (non waiting) copy there)