Getting "Reboot Required" notifications even though the option to prevent them is enabled - Advanced Installer Community
jbothe
Posts: 13
Joined: Tue Mar 31, 2020 11:53 am

Getting "Reboot Required" notifications even though the option to prevent them is enabled

Hi,

We have a project that is installing (and updating) a service. We are getting "Reboot Required" notifications like this:

Image
Even though we have suppressed reboot messages:

Image
We are also stopping and deleting the service on install (and waiting for this to complete):

Image
So the question is why are we seeing these reboot message even though the option to prevent them is enabled? Any how can we ensure the installer doesn't think a reboot is required?

Thanks,
John
Catalin
Posts: 7852
Joined: Wed Jun 13, 2018 7:49 am

Re: Getting "Reboot Required" notifications even though the option to prevent them is enabled

Hello John,

When the "Suppress all reboots and reboot prompts" option is used, we actually use the Windows Installer support by setting the "REBOOT" property to "ReallySuppress".

However, please note that suppressing all reboots does not mean that Windows just ignores the fact that some files need to be replaced/removed. The reboot must be done sometime and in some cases Windows will insist on it, regardless of what value the Windows Installer "REBOOT" property is set to.

Sometimes, the reboot is triggered by the Windows Restart Manager itself, not by Windows Installer. Thus, the "Suppress all reboots and reboot prompts" option is ignored. In order to suppress that reboot prompt, you can try to set the "MSIRESTARTMANAGERCONTROL" property to "Disable" or to "DisableShutdown" in the "Install Parameters" page or through the command line.

Hope this helps.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
jbothe
Posts: 13
Joined: Tue Mar 31, 2020 11:53 am

Re: Getting "Reboot Required" notifications even though the option to prevent them is enabled

Thanks Catalin, i'll give that a try.

How about the way i've configured the service for upgrade, will that correctly stop the service, install the new files and start it again?

Thanks,
John
jbothe
Posts: 13
Joined: Tue Mar 31, 2020 11:53 am

Re: Getting "Reboot Required" notifications even though the option to prevent them is enabled

Hi again Catalin,

We set MSIRESTARTMANAGERCONTROL to "Disable" using an install parameter, this didn't seem to have an impact, we are still seeing reboot required messages.

This is problematic because these installers need to be pushed out to client devices using silent installs and sometimes it automatically restarts users computers without their knowledge.

Is there a way to figure out why it thinks it needs a restart and fix the problem that way?

Thanks,
John
Catalin
Posts: 7852
Joined: Wed Jun 13, 2018 7:49 am

Re: Getting "Reboot Required" notifications even though the option to prevent them is enabled

Hello John,
How about the way i've configured the service for upgrade, will that correctly stop the service, install the new files and start it again?
Yes, the service is configured well. You could, on install, leave only the "Start" option as, if I'm not mistaken, all 3 options checked mean "restart" for the service.
Is there a way to figure out why it thinks it needs a restart and fix the problem that way?
This happens during the "InstallValidate" standard action.

The "InstallValidate" standard action verifies that all volumes to which cost has been attributed have sufficient space for the installation. It also notifies the user if one or more files to be overwritten or removed are currently in use by an active process.

With that being said, could you please try to add a "Stop Service" custom action before the "InstallValidate" standard action and let me know if this still persists?

The "InstallValidate" standard action is part of the "Preparing" action group. With that being said, our custom action should be scheduled before the "Preparing" action group (e.g. between the "Paths Resolution" and "Preparing" action groups, in "Install Execution Stage")

Hope this helps.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
jbothe
Posts: 13
Joined: Tue Mar 31, 2020 11:53 am

Re: Getting "Reboot Required" notifications even though the option to prevent them is enabled

Hi Catalin,

OK, thanks... so does this look right? Should the any of these options be disabled?

Image
BTW, we are also including the 2019 VC++ redistributable as a merge module... could this be causing an issue?

Thanks,
John
Catalin
Posts: 7852
Joined: Wed Jun 13, 2018 7:49 am

Re: Getting "Reboot Required" notifications even though the option to prevent them is enabled

Hello John,

Let's start with this:
BTW, we are also including the 2019 VC++ redistributable as a merge module... could this be causing an issue?
Honestly, I do not see why that would be a problem. With that being said, I believe the fact that you are including the 2019 VC++ redistributable as a merge module does not affect the behavior.
OK, thanks... so does this look right? Should the any of these options be disabled?
Let's recap this so we can better understand what is happening.

Most likely, the reboot message appears when the newer version tries to uninstall the older version. As you may know, an upgrade proceeds as it follows:
  • uninstalls the older version
  • installs the newer version
Even though the service's control operations are configured as expected and the service is stopped (when the "StopService" action is executed), as we have discussed in the earlier thread, there is a standard action that does this check before the setup gets to stop the service and it prompts with this message.

What we are doing here is that we try to stop the service before that action takes place, so we can avoid the reboot message.

Why we recapped the above: as you can see under the "Execution Stage Condition", there are two options:
  • Upgrade
  • Replaced by a new version
The difference between these two is the following:
  • if the "Upgrade" option is selected, the custom action will be executed during the installation of the newer version
  • if the "Replaced by a new version" option is selected, the custom action is executed during the uninstall process of the older version
In our scenario, I believe that only the "Replaced by a newer version" option should be checked.

Additionally, please do not forget that the setup must be run elevated from the start.

Hope this helps.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”