We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

BCh
Posts: 63
Joined: Wed Jan 17, 2007 6:32 am
Location: Australia

Check if reboot required after each prerequisite.

Hi,

Have install that checks for .Net Framework (various), SQL Server , ODBC .....

Having issues (especially on Microsoft Surface running Windows 10) where a system reboot is really required after some of these prerequisites some of the time.

Is there a way to:

1) Check if System requires a reboot before install. Have found that Windows 10 automatic updating of OS is a real pain most of the time.

2) Check if as a result of each prerequisite a reboot is required before the installation of the next prerequisite.

I know I can force a reboot after each prerequisite but would like to only do reboot if really required.
Noticed that if reboot required and not done then future prerequisites or actual install can fail (i.e. if SQL requires reboot then later in install when try and load db this will fail).


Thanks,

Brian
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Check if reboot required after each prerequisite.

Hi Brian,
1) Check if System requires a reboot before install. Have found that Windows 10 automatic updating of OS is a real pain most of the time.
Yes, for this you can create a custom action that will search if any reboot is pending. Please take a look on the following article which may be useful to you: Depending the approach that you will use, you can use the appropriate custom action from our predefined list of custom action to integrate the custom action in the installer.
2) Check if as a result of each prerequisite a reboot is required before the installation of the next prerequisite.
From the Prerequisite Properties Tab you can set the reboot behaviour for each prerequisite.

Should there be any difficulty you encounter implementing something, please do not hesitate to contact me and I will gladly assist.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
BCh
Posts: 63
Joined: Wed Jan 17, 2007 6:32 am
Location: Australia

Re: Check if reboot required after each prerequisite.

Thanks Dan.

What I am finding is that the prerequisite (SQL) is failing because the computer needs a reboot. This is before the installation of the main program.

It looks like custom actions occur after installation of prerequisites - is that the case?

I cannot see how to run the custom action (PowerShellScriptFile) prior to prerequisite install.

Also not sure how to stop or continue the install based on the result of the powershellscriptfile.

Thanks,

Brian
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Check if reboot required after each prerequisite.

Hi Brian,

Note that you can install the SQL as a feature-based prerequisite. For details, please check the How can I install the SQL Server as a feature-based prerequisite? article.

Please let me know if you have other questions.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
BCh
Posts: 63
Joined: Wed Jan 17, 2007 6:32 am
Location: Australia

Re: Check if reboot required after each prerequisite.

Dan,

Not sure how this is going to help with the reboot issue and running a Custom Action?

Can you run a custom action as part of the prerequisite installs?


When I now try and install SQL 2016 Express Advanced SP1 it successfully installs according to the SQL installer (when I look at C:\Program Files\Microsoft SQL Server\130\Setup Bootstrap\Log\Summary) but advanced installer flags it as Failed (shown in the Prerequisites Install window).

SQL now never installs but then keeps failing saying the requested features may already be installed.

Believe this might be due to the SQL Install Conditions for the Prerequisites not working.

The Install Conditions has criteria of Registry key exists and search string of "HKLM\SOFTWARE\Microsoft\Microsoft SQL Server\130\SQLServer2016\CurrentVersion".

When I check this register key using Regedit it is there.

Any suggestions why Advanced Installer does not see this Registry Key?

If I reboot after SQL install I then confirmed that Registry Key exists and Advanced Installer still try's to install and fails agains with SQL log saying requested features may already be installed.
So can't go back and can't go forward to main install!

Can you create a log as part of the prerequisite install and if you can't do the main install still check the log file.


I need SQL installed since program will not work without SQL installed so have set not to continue with main installation even if the prerequisite is not installed.


Brian
BCh
Posts: 63
Joined: Wed Jan 17, 2007 6:32 am
Location: Australia

Re: Check if reboot required after each prerequisite.

Any update especially reboot question?

Thanks,
Brian
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Check if reboot required after each prerequisite.

Hello Brian,

First of all I want to deeply apologize because we skipped your forum thread. My colleague Dan was out of the office for some time and it seems your thread was overlooked somehow.
Not sure how this is going to help with the reboot issue and running a Custom Action?

Can you run a custom action as part of the prerequisite installs?
Actually no. But as a workaround, not sure a suitable one though, you can create a separate setup package or even a small application which will perform the reboot check and trigger a reboot if needed. The reboot check app can be added as another prerequisite and should be scheduled after each one of your prerequisites for which you want to do the reboot check. Basically you should add again as a prerequisite the reboot check app after each one of the prerequisite you need to check if a reboot is necessary. However, I suggest you to first thoroughly test this approach and make sure it behaves as you expected.

Also, I've forwarded your feedback to our development team and maybe such a dedicated option will be available in the future. Until then, personally I suggest you to use our "Reboot system after installing this prerequisite" option for each of your prerequisite know it might require a reboot.
When I now try and install SQL 2016 Express Advanced SP1 it successfully installs according to the SQL installer (when I look at C:\Program Files\Microsoft SQL Server\130\Setup Bootstrap\Log\Summary) but advanced installer flags it as Failed (shown in the Prerequisites Install window).

SQL now never installs but then keeps failing saying the requested features may already be installed.

Believe this might be due to the SQL Install Conditions for the Prerequisites not working.

The Install Conditions has criteria of Registry key exists and search string of "HKLM\SOFTWARE\Microsoft\Microsoft SQL Server\130\SQLServer2016\CurrentVersion".

When I check this register key using Regedit it is there.

Any suggestions why Advanced Installer does not see this Registry Key?
I've tested the scenario but I cannot replicate the issue. Could you please send us your AIP (project file) to support at advancedinstaller dot com so we can investigate its settings?
If I reboot after SQL install I then confirmed that Registry Key exists and Advanced Installer still try's to install and fails agains with SQL log saying requested features may already be installed.
So can't go back and can't go forward to main install!

Can you create a log as part of the prerequisite install and if you can't do the main install still check the log file.
Indeed, as an improvement we could try to log more details for the prerequisite installation in the main log in the future. Thank you for your suggestion.

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

Return to “Building Installers”