VersalEszett
Posts: 6
Joined: Mon Jan 29, 2018 5:17 pm

Reboot system after cancelling installation

Hi,

We're currently using "Reboot behaviour: Force Reboot after install" in the install parameter page, but that only affects successful installation.

We'd like to force a reboot not only after successful installation, but also when the users cancels installation/upgrade/downgrade/maintenance at any stage. So basically whenever there's a chance that the installed files have been changed.

I suppose I can do that the same way it's described in Reboot after uninstall and during upgrade, but there's no mention about cancelling, upgrade, or rolling back.
Daniel
Posts: 8238
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Reboot system after cancelling installation

Hello,

To trigger a reboot on cancelling (thus after rolling back sequence) you will have to write your own custom action which will trigger a computer reboot. The custom action should be scheduled after "Install Execution Stage -> Preparing" action group and must be configured to execute on rollback.

If you have any further questions just let us know.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
VersalEszett
Posts: 6
Joined: Mon Jan 29, 2018 5:17 pm

Re: Reboot system after cancelling installation

Hi,

thanks for your help! I've tried to add a custom action to force reboot as described in the post linked earlier (Reboot after uninstall and during upgrade). Unfortunately, it's not possible to be executed on rollback:
advinst_2018-04-27_10-46-15.png
advinst_2018-04-27_10-46-15.png (36.45 KiB) Viewed 3583 times
I could use an action to just directly reboot the system, but I'd like to show the same prompt as when the installation was successful.
Daniel
Posts: 8238
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Reboot system after cancelling installation

Hello,

Unfortunately this is not possible. This is the design of Windows Installer, you cannot set any installer properties (including REBOOT) on deferred, rollback or commit installation stages.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
VersalEszett
Posts: 6
Joined: Mon Jan 29, 2018 5:17 pm

Re: Reboot system after cancelling installation

Hi Dan,

thanks for the explanation. However, I have not been able to get a consistent reboot prompt by setting the [REBOOT] Windows Installer property with a custom action. I also tried setting the property using a "control event" for the "Cancel" button in the Dialog editor without success:
advinst_2018-05-07_14-28-54.png
advinst_2018-05-07_14-28-54.png (29.93 KiB) Viewed 3545 times
So, if we reduce the question to "show the reboot prompt whenever the installer quits", be it on success, cancel, close, or whatever; would that be possible? Basically set the [REBOOT] property to "Force" as soon as possible?
Daniel
Posts: 8238
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Reboot system after cancelling installation

Hello,

When building an MSI setup package the REBOOT property mechanism is not evaluated anymore on installation failure and on rollback. The only solution will be to develop your own custom action code which will trigger a system reboot within your custom action code (not by setting the REBOOT property from your action code).

Also, I've talked with our development team about this scenario, and it seems as another workaround you can build an EXE package type and make sure the "Enhanced User Interface" feature is disabled (from "Themes" page -> "Configuration" tab). In this case if the reboot behavior, in "Install Parameters" page, is set to always force reboot, the reboot should be always triggered. However, currently due to an issue in our application the reboot prompt is triggered twice every time. :|

Hope this helped somehow.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”