Prevent InstallScript Reboot Dialog From Appearing
SummaryWill show you how to prevent reboot dialog from appearing.
SynopsisDuring 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.
DiscussionThere 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.
WorkaroundTo prevent the reboot dialog from appearing during an installation, go to the OnFirstUIAfter() event and set BATCH_INSTALL to 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 InformationYou can look at the InstallScript Language Reference in the help documents for more information on Event Handlers.