Question

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

Was it helpful?

Solution

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)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top