Archive: ExecWait does not wait


ExecWait does not wait
It's an interesting problem. I have this function to uninstall a previously installed product

Function RemoveOldProductVersion
HideWindow

Exch $R0
CopyFiles /SILENT /FILESONLY "$R0" $TEMP

; extract file's path
Push $R0
Call ExtractFilePath
Pop $R9

; extract file's name
Push $R0
Call ExtractFileName
Pop $R0

; call old product's uninstaller
ClearErrors
ExecWait '"$TEMP\$R0" "_?=$R9"'
IfErrors +3
Delete "$TEMP\$R0"
IfFileExists "$R9\*" 0 Done

MessageBox MB_OK|MB_ICONEXCLAMATION "$(OldVerRemoveError)"
Abort

Done:
BringToFront
FunctionEnd

I get the uninstaller's path and name from the registry and I call it this way
Push $R0
Call RemoveOldProductVersion

The thing is: This code worked absolutely perfect in NSIS 2.01. But since 2.02 "ExecWait" does not wait. It starts the uninstaller but in the same time the "$(OldVerRemoveError)" message appears (it's just a "there was a problem removing the older version" string).

I don't understand it. Can anyone tell me the reason? Thanks.

You shouldn't quote the _?= part, even if it has spaces.

See this thread for more information about the change that caused your script to fail.


Simple solution. And I couldn't sleep the night ... ;)
No, seriously: Thanks.