Reboot one time for two prerequisite installs - Advanced Installer Community

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!

BobCrothers
Posts: 66
Joined: Wed Dec 05, 2007 10:58 pm

Reboot one time for two prerequisite installs

Hi,

We are installing multiple prerequisites. Two of the prerequisites require rebooting. I would like to reboot ONE time at the end of installing all the required prerequisites. How do I reboot at the end of installing the prerequisites if one or both of the reboot prerequisites were installed?

Thanks
Bob
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Reboot one time for two prerequisite installs

Hi Bob,

In order to do this you should first suppress the reboot prompt of the first prerequisite. For MSI packages this can be done by settings the REBOOT property to "ReallySuppress" in the command line of the prerequisite. If the prerequisite is not a MSI, most likely the reboot cannot be suppressed. In this case, you can try installing the prerequisite silently (this may not work).

After you make sure that the first prerequisite will not prompt for a reboot, you can set the one that does prompt as the last prerequisite in the list. This way the last prerequisite will prompt for a reboot after all prerequisites were installed.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
BobCrothers
Posts: 66
Joined: Wed Dec 05, 2007 10:58 pm

Re: Reboot one time for two prerequisite installs

Hi Cosmin,

I thought of this, and this is what we are currently using. This works fine, except in the case where prerequisite #1 is installed, and requires a reboot. But we have said suppress the reboot. Prerequisite #2 is NOT installed because it already exists on the machine. Prerequisite #2 was not installed and so the machine is not rebooted.

What I need is some properties
If prerequisite #1 or prerequisite #2 installed then reboot.

Thanks,
Bob
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Reboot one time for two prerequisite installs

Hi Bob,

I'm afraid that this is not supported by Advanced Installer. Therefore, the best approach would be to let each prerequisite reboot the machine if it needs it.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
BobCrothers
Posts: 66
Joined: Wed Dec 05, 2007 10:58 pm

Re: Reboot one time for two prerequisite installs

Thanks for the quick response Cosmin.

I thought this was a common problem, with an easy solution, I guess not.

Could I do something like this?
Create file search #1 for the file which is installed be prerequisite #1
Create file search #2 for the file which is installed be prerequisite #2

Create a custom action, called checkForReboot.
checkForReboot would do the following
If file search #1 or file search #2 or both file searches are NOT found files, then set a property needToReboot = true


checkForReboot would be run before the installing the prerequisites. I have never done this. But I see I can add “Begin” in the InstallExecuteSequence. checkForReboot would be run at “Begin”


Create a second custom action, called setReboot
setReboot would do the following
if needToReboot was true it would set Reboot=Force.

setReboot would be run after comment.

Is there hope of this working? Any suggestions?

Thanks
Bob
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Reboot one time for two prerequisite installs

Hi Bob,

Unfortunately the bootstrapper cannot run custom actions before the prerequisite are installed because the install process has not started yet. However, we have this feature on our TODO list and it will be available in a future version of Advanced Installer.

A solution would be to create your own EXE bootstrapper which checks the existence of the files and sets the reboot properties accordingly for the two prerequisites. I'm not sure how the code would look like, but it can be done.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”