代码之家  ›  专栏  ›  技术社区  ›  Cuga

如何等待卸载程序完成?

  •  3
  • Cuga  · 技术社区  · 15 年前

    使用NSI,我想启动一个卸载程序,等待它完成,然后再继续我的安装程序。问题是卸载程序正在立即返回,即使我正在使用 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”。有人绕过这个吗?

    谢谢

    1 回复  |  直到 15 年前
        1
  •  4
  •   Anders    15 年前

    您链接到的页面通常讨论ExecWait,但它也链接到 When I use ExecWait uninstaller.exe it doesn't wait for the uninstaller ,这是您要查找的NSI特定信息(uu?=C:\TheInstallDir告诉NSI卸载程序不要将自己复制到%temp%,并在那里执行一个新的(非等待的)副本)

    推荐文章