Old 16th March 2007, 20:03   #1
stonkers
Senior Member
 
Join Date: Sep 2003
Posts: 192
Silent Uninst and Inst

I'm trying to further automate all of my builds by creating a website that does builds and then deploys them automatedly. I'm using psexec to call the exe on the machine where it has to run against in silent mode. I have a problem with doing this because of the uninstaller.

The first thing the release does is check the registry to see if the app is already installed and if so, ask the user if they want to uninstall or abort. I can check here if this is silent and if so, automatically uninstall, but then there's another point where the user has to intercede (press OK and click Install). Is there a way I can have it skip by this?

Thanks,
Eric

Eric
stonkers is offline   Reply With Quote
Old 16th March 2007, 20:28   #2
Red Wine
Forum King
 
Red Wine's Avatar
 
Join Date: Mar 2006
Location: Ath. GR
Posts: 2,078
You could add all the needed for user interaction code into .onInit function and after that before continue (leave function) add the instruction SetSilent silent

Quick AVI Creator - Quick and easy convert from DVD/MPEG/AVI/MKV to AVI/MP4/MKV
Quick AVI Creator entirely edited with NSIS and entirely upgraded to Unicode NSIS
Red Wine is offline   Reply With Quote
Old 16th March 2007, 20:35   #3
stonkers
Senior Member
 
Join Date: Sep 2003
Posts: 192
I'm in the situation you're talking about already now for most of our apps (only interaction is when I ask if they want to uninstall in .oninit).

I'm sure this is just the first in a series of questions, but I think I figured out the uninst part:

Just run the uninstaller silently also if this is a /S. I'm trying it right now.

Thanks Much,
Eric

Eric
stonkers is offline   Reply With Quote
Old 21st March 2007, 14:04   #4
stonkers
Senior Member
 
Join Date: Sep 2003
Posts: 192
I've tried this, but it doesn't seem to work. It goes silent whether I've run it with the /S option or not. Here's the code:

____________________________________________

IfSilent runSilentUninstall

MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION \
"MyApp is already installed. $\n$\nClick `OK` to remove the \
previous version or `Cancel` to cancel this upgrade." \
IDOK uninst
Abort

;Run the uninstaller
uninst:
ClearErrors
CopyFiles /SILENT /FILESONLY "$INSTDIR\myApp\Uninst.exe" "$TEMP\Uninst.exe"
Delete "$INSTDIR\myApp\Uninst.exe"
ExecWait '"$TEMP\Uninst.exe" _?=$INSTDIR'
goto done

runSilentUninstall:
ClearErrors
CopyFiles /SILENT /FILESONLY "$INSTDIR\myApp\Uninst.exe" "$TEMP\Uninst.exe"
Delete "$INSTDIR\myApp\Uninst.exe"
ExecWait '"$TEMP\Uninst.exe" /S _?=$INSTDIR'

done:
Abort

____________________________________________

Any help?

Thanks,
Eric <><

Eric
stonkers is offline   Reply With Quote
Old 21st March 2007, 14:17   #5
stonkers
Senior Member
 
Join Date: Sep 2003
Posts: 192
OK, figured it out. This is fine other than the abort that keeps me from running the installer.

Eric
stonkers 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