Prevent InstallScript Reboot Dialog From Appearing

Prevent InstallScript Reboot Dialog From Appearing

Summary

Will show you how to prevent reboot dialog from appearing.

Synopsis

During an InstallScript installation, the reboot finish dialog may appear instead of the default finish dialog. This knowledge base article will show you why this is the case and how you can prevent the reboot dialog from appearing.

Discussion

There is an InstallScript boolean variable BATCH_INSTALL which is used to determine if a reboot is needed or not. It's initally set to FALSE, but during the course of data transfer the InstallScript engine will set this to TRUE if it encounters a situation where a reboot is needed (...locked file, etc).

Now the logic in our various UIAfter() events will check on this BATCH_INSTALL variable and display either a standard finish dialog or a reboot dialog. So you can force the standard finish dialog to always appear by simply setting BATCH_INSTALL to FALSE.

NOTE: This will result in your install/uninstall not being fully completed. The Windows Installer service is probably prompting for a reboot because there are files that are locked and it will remove upon reboot.

Workaround

To prevent the reboot dialog from appearing during an installation, go to the OnFirstUIAfter() event and set BATCH_INSTALL to FALSE...

BATCH_INSTALL=FALSE:

...after the 'begin' statement. Doing this will force the existing logic to display the default finish dialog.

To do the same during an uninstall/maintenance, make sure you add the OnMaintUIAfter() event and make the changes in this event. For an update, make sure you add the OnUpdateUIAfter() event.

Additional Information

You can look at the InstallScript Language Reference in the help documents for more information on Event Handlers.
Was this article helpful? Yes No
No ratings
Version history
Revision #:
1 of 1
Last update:
‎Jul 18, 2018 09:38 PM
Updated by: