darylc@magenic.com
Posts: 2
Joined: Fri Jul 06, 2018 4:44 pm

Prerequisites - Detect Pending Reboot on Computer before installing prerequisites

Hi Admin,

We've been using advance installer on our project and we are planning to have a feature to detect a pending reboot on a computer before the prerequisites are installed to avoid any errors.

The attempts that I tried were the following:
1) Created a dialog that would be displayed before prerequisite ui dialogs - this dialog would initially run a custom action. The custom action would check if theres a pending reboot using powershell script then update a user defined windows installer property that would be used as a condition to display the restart dialog. - But it seems that this is not possible viewtopic.php?t=26450

2) Created a conditional text and buttons on existing prerequisite dialog. The existing prerequisite dialog would initially run a custom action. The custom action would check if theres a pending reboot using powershell script then update a user defined windows installer property that would be used as a condition to display the conditional text and buttons inside the existing prerequisite dialog - didn't worked as well, I assume due to the same reason as #1

3) Created a console app in c# that detects pending reboot(shows dialog message if there is). Then the executable file that would be produced by this console app would then be added as a prerequisite on our installer - not sure if this would work but I'm still in-progress on doing this.

Would just like to seek assistance if you have other better options in mind? Thanks in advance.
Catalin
Posts: 6586
Joined: Wed Jun 13, 2018 7:49 am

Re: Prerequisites - Detect Pending Reboot on Computer before installing prerequisites

Hello and welcome to our forums,

In order to achieve that, you can create your own custom action which detects if a reboot is pending before the prerequisite is installed.

You can find some useful information about this in our " How do I detect a reboot is pending BEFORE install?" thread.

Hope this helps!

Regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
darylc@magenic.com
Posts: 2
Joined: Fri Jul 06, 2018 4:44 pm

Re: Prerequisites - Detect Pending Reboot on Computer before installing prerequisites

Thanks for the response! I'll try this out 8-)
Daniel
Posts: 8238
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Prerequisites - Detect Pending Reboot on Computer before installing prerequisites

You are always welcome.

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

Return to “Building Installers”