AnswerCreating the restart functionalityThe reboot prompts shown sometimes by Windows Installer
during or after an installation are controlled by the
REBOOT property. By using a checkbox on the last dialog
of the installation this property can be configured to give the user
control over these prompts. In order to add a "restart machine" functionality to your
installation package, you can follow these steps: - go to the Install
Parameters page and set the "Reboot Prompts" combo to
Suppress all reboots and reboot
prompts
- go to the Dialogs page and
add a checkbox on "ExitDialog"
- in the Properties pane
of the checkbox set the "Text" field to Restart
machine
- set the "Property Name" field to
REBOOT_CHECK
- select the "Finish" button
- create this "SetProperty" Published control event:
[REBOOT] Force AI_INSTALL AND REBOOT_CHECK The reverse logic can be used to reboot the machine by
default: - go to the Install
Parameters page and set the "Reboot Prompts" combo to
Force reboot after install
- go to the Dialogs page and
add a checkbox on "ExitDialog"
- in the Properties pane
of the checkbox set the "Text" field to Do not restart the
machine
- set the "Property Name" field to
REBOOT_CHECK
- select the "Finish" button
- create this "SetProperty" Published control event:
[REBOOT] ReallySupress AI_INSTALL AND REBOOT_CHECK REBOOT propertyThe possible values of the REBOOT property are: - Force - the installation will always prompt for a reboot after
it is completed. If the installation is silent the machine will be
automatically restarted at the end of the installation.
- Suppress - the installation will not prompt for a reboot after
it is completed, even if one is required. However, this option does
not affect the reboot prompts which may appear during the
installation.
- ReallySuppress - the installation will not prompt for a reboot
while it is running or after it is completed (even if one is
required).
These values can be used to control the reboot prompts during
or after the installation is completed. For example, you can use a
radio button group with two radio buttons: - "Restart the machine" - this radio button has the "Value" field
set to Force
- "Do not restart the machine" this radio button has the "Value"
field set to ReallySuppress
Make sure that the "Property Name" field in the "Properties" pane
of the radio button group is set to
REBOOT.
|