tomg
Posts: 7
Joined: Wed Feb 10, 2010 8:29 pm

How to uninstall -> reboot -> install

Hello,

I'm using Advanced Installer Enterprise.
I've got the updater working where it uses the version number and updater.exe correctly.

Upon installation of an updated version of our product, our application requires first
that we uninstall completely, then a reboot ... only then can the updated version be installed.
I'd like the new installation to automatically start when the reboot is finished.

Questions are either 'How do I do that?' ... or 'Where is a link to documentation on how to do it?'

Thanks
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: How to uninstall -> reboot -> install

Hello,

Attached is the solution.
In the second install, initiate a ForceReboot action after which suspend the install.
The system will reboot and the install will automatically resume.

Best regards,
Gabriel
Attachments
RebootAfterUpgrade.zip
(618.84 KiB) Downloaded 449 times
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
tomg
Posts: 7
Joined: Wed Feb 10, 2010 8:29 pm

Re: How to uninstall -> reboot -> install

Ok. Thanks. I'll try that.
tomg
Posts: 7
Joined: Wed Feb 10, 2010 8:29 pm

Re: How to uninstall -> reboot -> install

Not sure I understand how this would work.
Looks like there are two installations.
The first, places a 'PublishProduct' custom action to do a REBOOT after commit.
The second places twoVB scripts in an 'InstallInitialize' custom action. The first will do a reboot, the second a suspend.
It seems this would happen before 'Uninstall' would run.

Am I supposed to split my installations into 2? The first would be for people who don't have the product installed
and the second for people who do?
Or, is a chained installation? I don't see that in your configs.

I've tried to place the 'InstallInitialize' custom action into my config as is and I get the same error as before.
Meaning no prompt for reboot, and it tries to install the new version without a reboot.
If I move the vbscripts just after my 'Uninstall' scripts, it does prompt for a reboot to continue.
But when the system reboots, I get an "This Installation package can not be opened. ... " error.

Seems like what I need is to have the above scripts run right after the 'Uninstall' completes.
I don't see a way to do this. Also, if the 'Uninstall' completes, I would imagine the scripts would be gone as well.
tomg
Posts: 7
Joined: Wed Feb 10, 2010 8:29 pm

Re: How to uninstall -> reboot -> install

Ok. I got it going. Just to let you know. I'll post results in a bit.

Return to “Common Problems”