Winamp & Shoutcast Forums

Winamp & Shoutcast Forums (http://forums.winamp.com/index.php)
-   NSIS Discussion (http://forums.winamp.com/forumdisplay.php?f=65)
-   -   Can't execute uninstaller from installer (http://forums.winamp.com/showthread.php?t=279455)

PeanutMocha 19th October 2007 19:44

Can't execute uninstaller from installer
 
I'm trying to uninstall the old version of my software (if installed) before installing the current version using
this code template

My code looks like:

uninst:
ClearErrors
MessageBox IDOK $R0 ; Shows correct uninstaller path
ExecWait '$R0 _?=$INSTDIR' ;Do not copy the uninstaller to a temp file

; ... some stuff cut out for brevity

section "Uninstall"

# Always delete uninstaller first
delete $INSTDIR\Remove${PROGRAM_BASE_FILENAME}.exe
; Verified same as $R0 above

Unfortunately when the uninstaller is executed via ExecWait I get the error:
NSIS Error
Error Launching Installer

If I just browse to the location held in $R0, I find the uninstaller and have no problem running it.

If I use Exec instead of ExecWait, the uninstaller and installer run at the same time.

I'm on Vista 32 bit.

Any ideas?

Thanks!

Eric

kichik 19th October 2007 21:54

Exec and ExecWait use the exact same piece of code to create a new process. The only difference is the wait. So something else must be wrong and my bet goes to quotes. $R0 might contain spaces and should therefore be quoted.


All times are GMT. The time now is 04:19.

Copyright © 1999 - 2010 Nullsoft. All Rights Reserved.