Allow bootstrap EXE to reboot after silent install - Advanced Installer Community
theBuildMan
Posts: 8
Joined: Sat Jan 31, 2015 9:52 pm

Allow bootstrap EXE to reboot after silent install

Hi everyone,
Having trouble here with reboots and a silent installation. Here is my configuration:

1. Simple setup.exe from Advanced Installer that has a single main feature in the core MSI to install plus 2 post-install prereq's
2. I am running the cmd line on a server with setup.exe /exenoui /qn
3. During the install, it is likely that a file will be in use. I want the silent install to go ahead and perform the reboot if needed, but it should happen _after_ the main installation and prereq installs are complete.

I've already read: http://www.advancedinstaller.com/forums ... =5&t=28596 which seems like a giant hack to get this working.

Is there any way to configure the bootstrapper EXE to check the PendingFileRenameOperations reg setting and do the reboot when the installation is fully complete and we're using a silent installation?

if I use setup.exe /exenoui /qn REBOOT=Force, then the installation reboots before the pre-req installs are completed.

Edit: When I run this from the UI, it seems to do exactly what is needed and not reboot until after the prereqs are done
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Allow bootstrap EXE to reboot after silent install

Hi,
Is there any way to configure the bootstrapper EXE to check the PendingFileRenameOperations reg setting and do the reboot when the installation is fully complete and we're using a silent installation?
I'm afraid that this cannot be achieved. To achieve what you want you can follow the instructions from the thread you mentioned.

To summarize this, you can create a simple MSI package, uncheck the "Register product with Windows Installer" option for it, then add a "Set installer property" custom action after the "Install Execution Stage -> Searches" action group that sets the "REBOOT" property to "Force" depending on the appropriate condition.

This MSI package ca be added as a "post-install" prerequisite in your main package after all the other prerequisites, so the reboot will be performed only after all the prerequisites were installed.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
theBuildMan
Posts: 8
Joined: Sat Jan 31, 2015 9:52 pm

Re: Allow bootstrap EXE to reboot after silent install

Thank you for the clear response. I'll work on this approach.
theBuildMan
Posts: 8
Joined: Sat Jan 31, 2015 9:52 pm

Re: Allow bootstrap EXE to reboot after silent install

I pretty much have this working. Just trying get the final logic right. While testing this solution to my problem I thought of another solution.

Can I restart services at the end of installation instead of rebooting? Or would that also require a "helper" MSI because of the post-install pre-reqs? The only reason I'm using post-install pre-reqs is because I need to uninstall an older pre-req version. Is it possible to do the following:

1. uninstall old version pre-req (if it exists)
2. install pre-reqs
3. install main install

I I can do that I can get away from all these hacks to deal with the post-install pre-reqs

Thanks
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Allow bootstrap EXE to reboot after silent install

Hi,
Can I restart services at the end of installation instead of rebooting? Or would that also require a "helper" MSI because of the post-install pre-reqs?
Yes, you can restart the services at the end of the installation, but as you mentioned, this would also require a "helper" MSI package added after all the "post-install" prerequisites.
Is it possible to do the following:

1. uninstall old version pre-req (if it exists)
2. install pre-reqs
3. install main install
Yes, this should be possible. However, it depends on the way you uninstall the old version of the prerequisite. Do you use a custom action for this?

If you use a custom action, you can place it on the "Wizard Dialogs Stage" in the main installer, but in this case it will be executed only when the package is installed with Full UI. Otherwise, you also need to create a "helper" MSI package which uninstalls that prerequisite, and place it before the other prerequisites.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
theBuildMan
Posts: 8
Joined: Sat Jan 31, 2015 9:52 pm

Re: Allow bootstrap EXE to reboot after silent install

For the pre-req uninstall, I'm using the Application Upgrades feature with the following setup:

Automatically upgrade older product versions
Use original installation path when upgrading
Uninstall old version first and then install new version
Upgrades
added upgrade code of the OLD Perl installation that I want to remove and set the Max Ver to that version
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Allow bootstrap EXE to reboot after silent install

Hi,

In this case, you can create a simple MSI package, uncheck the "Register product with Windows Installer" option from the "Product Details" page and add the Upgrade Code of your old prerequisite in the "Upgrades" page of this small MSI, then add this MSI as a prerequisite in the main package before the other prerequisites.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
theBuildMan
Posts: 8
Joined: Sat Jan 31, 2015 9:52 pm

Re: Allow bootstrap EXE to reboot after silent install

Hi Eusebiu,
I was not able to get the helper msi to function properly. The bootstrapper kept complaining that the helper MSI was not installed or that install failed. I presume that was because it was looking for the installer GUID after the msi completed.

instead I ended up talking with one of our installer experts. He assisted us in "hacking" the Perl msi to add in the proper FindRelatedProducts and upgrade steps. Now, we can install perl and the perl msi itself will handle uninstalling the old version.

thanks for all your help on this.

From a user perspective we really love Advanced Installer,but for the things I usually do I'd love to see some enhancements/better configuration capabilitys for the bootstrap.exe.

thanks again
-d
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Allow bootstrap EXE to reboot after silent install

You're welcome. I'm glad you got this working.
I was not able to get the helper msi to function properly. The bootstrapper kept complaining that the helper MSI was not installed or that install failed. I presume that was because it was looking for the installer GUID after the msi completed.
Indeed, this happens because it looks if the conditions from the "Install Conditions" tab of the prerequisite are fulfilled after the installation. To avoid this, you can use the "Always install prerequisite" option in that tab.

Just let us know anytime you need help.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”