使用 NSIS,我想启动卸载程序并等待其完成,然后再继续安装程序。问题是卸载程序立即返回,即使我使用的是 ExecWait。
我在这里看到了这个页面:http://nsis.sourceforge.net/When_I_use_ExecWait,_it_doesn%27t_wait其中提到了为什么会发生这种情况,然后提供了一些建议,但我无法让我的工作正常工作。
我正在尝试的代码是:
ExecWait '"C:\path\to\uninstall.exe" /NCRC' $0
MessageBox MB_OK "uninstaller returned $0"
在启动卸载程序的同时,会出现显示“卸载程序返回 0”的消息框。有人解决过这个问题吗?
谢谢
最佳答案
您链接到的页面一般讨论 ExecWait,但它也链接到 When I use ExecWait uninstaller.exe it doesn't wait for the uninstaller ,这是您正在寻找的 NSIS 特定信息( _?=c:\theinstalldir 告诉 nsis 卸载程序不要将自身复制到 %temp% 并在那里执行一个新的(非等待)副本)
关于installation - 如何等待卸载程序完成?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3256834/