How to wait for the removal to complete?

Using NSIS, I want to start the uninstaller and wait for it to complete before continuing with the installer. The problem is that the uninstaller returns immediately, although I use ExecWait.

I saw this page here: http://nsis.sourceforge.net/When_I_use_ExecWait,_it_doesn%27t_wait , which mentions why this happens and then offers some suggestions, but I can’t get my work.

The code I'm trying to do is:

ExecWait '"C:\path\to\uninstall.exe" /NCRC' $0
MessageBox MB_OK "uninstaller returned $0"

Shows a message box that displays "uninstaller received 0" at the same time that the uninstaller starts. Has anyone got around this?

thank

+3
source share
1 answer

The page you contacted talks about ExecWait in general, but also refers to When I use ExecWait uninstaller.exe, it does not wait for deletion , that is, the specific NSIS information you are looking for (_? = C: \ theinstalldir tells nsis uninstaller so as not to copy itself to% temp% and execute a new (non-pending) copy there)

+4
source

Source: https://habr.com/ru/post/1754828/


All Articles