- NSIS Discussion
- Silent Uninstall
Archive: Silent Uninstall
goldy1064
12th July 2005 22:22 UTC
Silent Uninstall
Here's the problem, I previously post this and used the solution from there. Now, though, the start /wait uninst.exe /S doesn't wait, it immediately returns control back. I was wondering if there was a way to accomplish this with the uninstaller as well?
Afrow UK
13th July 2005 12:16 UTC
This should help you:
http://forums.winamp.com/showthread....+uninstall.exe
-Stu
goldy1064
13th July 2005 17:11 UTC
So do I have to use the syntax uninst.exe /S _?=bla even from the commmand-line when I'm not trying to uninstall before installing?
Afrow UK
13th July 2005 17:25 UTC
uninst.exe /S should work in most cases, but when using ExecWait (through NSIS) it will not wait unless you pass the
_? parameter (install dir path).
If no _? parameter is used, the $INSTDIR is set to the uninstallers $EXEDIR.
-Stu
goldy1064
13th July 2005 18:03 UTC
Ok, I got it working from within the installer, but it still won't work by just invoking a silent uninstall from the command-line when using the start command. Here's what I'm doing: start /WAIT uninst.exe /S and it will return control immediately (I even put in a message box to see if it just was executing too fast, but it wasn't).
Afrow UK
13th July 2005 23:01 UTC
I would have though that:
start /WAIT uninst.exe /S
would take /S as another parameter for start, when you need it for uninst.exe?
Shouldn't it be:
start /WAIT "uninst.exe /S"
-Stu
goldy1064
14th July 2005 21:16 UTC
No, that's not it. The parameters for start (that I'm passing) are /wait and then it takes the command that it should execute (uninst.exe) and the parameters to pass to that command (/S). This doesn't seem to work with uninst.exe, only with Setup.exe. Any ideas?
Afrow UK
14th July 2005 23:01 UTC
Try giving it _? as well
-Stu
goldy1064
14th July 2005 23:09 UTC
No, that didn't work either. Here's the command that I tried: C:\>start /WAIT /D"C:\Program Files\My App" uninst.exe /S "_?=C:\Program Files\My App"
This just seems like it should work...
*Edit: I have a messagebox in the uninstaller so I'll know that control was returned to the command prompt before the execution was finished.
goldy1064
14th July 2005 23:12 UTC
Here was something that I just thought of. I know that I've read somewhere about the uninstaller being copied somewhere before executing. Does that always happen? Or does that only happen in certain instances?
Afrow UK
14th July 2005 23:15 UTC
Try
start /WAIT /D"C:\Program Files\My App" uninst.exe "/S _?=C:\Program Files\My App"
-Stu
goldy1064
14th July 2005 23:20 UTC
Well, an award should be sent to you, it worked. Thanks!
Afrow UK
15th July 2005 08:09 UTC
Edit: Wrong topic lol