Archive: Silent Uninst and Inst


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


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


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


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


OK, figured it out. This is fine other than the abort that keeps me from running the installer.