Old 12th July 2005, 21:22   #1
goldy1064
Senior Member
 
Join Date: Jun 2005
Posts: 211
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?
goldy1064 is offline   Reply With Quote
Old 13th July 2005, 11:16   #2
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
This should help you:
http://forums.winamp.com/showthread....+uninstall.exe

-Stu
Afrow UK is offline   Reply With Quote
Old 13th July 2005, 16:11   #3
goldy1064
Senior Member
 
Join Date: Jun 2005
Posts: 211
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?
goldy1064 is offline   Reply With Quote
Old 13th July 2005, 16:25   #4
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
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
Afrow UK is offline   Reply With Quote
Old 13th July 2005, 17:03   #5
goldy1064
Senior Member
 
Join Date: Jun 2005
Posts: 211
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).
goldy1064 is offline   Reply With Quote
Old 13th July 2005, 22:01   #6
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
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
Afrow UK is offline   Reply With Quote
Old 14th July 2005, 20:16   #7
goldy1064
Senior Member
 
Join Date: Jun 2005
Posts: 211
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?
goldy1064 is offline   Reply With Quote
Old 14th July 2005, 22:01   #8
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
Try giving it _? as well

-Stu
Afrow UK is offline   Reply With Quote
Old 14th July 2005, 22:09   #9
goldy1064
Senior Member
 
Join Date: Jun 2005
Posts: 211
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 is offline   Reply With Quote
Old 14th July 2005, 22:12   #10
goldy1064
Senior Member
 
Join Date: Jun 2005
Posts: 211
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?
goldy1064 is offline   Reply With Quote
Old 14th July 2005, 22:15   #11
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
Try
start /WAIT /D"C:\Program Files\My App" uninst.exe "/S _?=C:\Program Files\My App"

-Stu
Afrow UK is offline   Reply With Quote
Old 14th July 2005, 22:20   #12
goldy1064
Senior Member
 
Join Date: Jun 2005
Posts: 211
Well, an award should be sent to you, it worked. Thanks!
goldy1064 is offline   Reply With Quote
Old 8th March 2016, 19:17   #13
pkonduru
Member
 
Join Date: Jul 2015
Posts: 86
This works:

start /WAIT /D"C:\Program Files\My App" uninst.exe "/S _?=C:\Program Files\My App"

But it leaves behind the uninst.exe
pkonduru is offline   Reply With Quote
Old 8th March 2016, 19:54   #14
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,524
Yes, you must manually delete the uninstaller after it has executed when using the _?= parameter because a Windows program cannot delete itself while it is still running.

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump