MessageBox action
The MessageBox action displays a Windows message box. It can be used to ask the user for confirmation, to display general messages, or to display error messages that terminate the installation. In addition to the standard Windows message box features, the InstallMate MessageBox action offers the following enhancements:
- If the installer runs in silent mode, the message box is automatically suppressed and the action returns the default result (see Result below).
- The message box is automatically closed and the action returns the default result if the user does not respond within a preset time-out period. This ensures that the installation can continue even if the user went away after starting the installation.
- The message box button labels are localized for the current installation language.
The message box result determines how the parent action sequence continues, as shown in the following table.
Notes
- If Fail mode is set to Fail if run, the parent action sequence is terminated and the installation is marked as failed. However, the latter only has an effect after the installer has executed the StartProcessing standard action and before EndProcessing.
- You should not place a MessageBox action that may return Retry or Try Again as the first action in an action sequence, because that will cause the MessageBox action itself to be repeated.
Result | Effect on parent action sequence |
---|---|
OK, Yes, Close, Ignore, Continue | Continues with the next action in the sequence. |
No | Exits the action sequence. |
Cancel, Abort | Exits the action sequence. If Fail mode (see below) is set to Fail if Cancel, then the installation is marked as failed. |
Retry, Try Again | Continues with the previous action in the sequence. |
Attributes
The following attributes and options are available.
Attribute | Description | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Action name | Enter the name of the action. This name is only used in InstallMate and is not visible to the user. | ||||||||||||||
Message text | Enter the localizable message text for the message box. | ||||||||||||||
Localized | Check this box to localize the Message text field and use different message texts for different languages. | ||||||||||||||
Buttons | Select the desired message box buttons from the drop-down list; the message box result corresponds to the button that the user clicked (see table above). The following choices are available:
Note: The message box buttons are automatically localized for the current installation language, so the actual buttons will show the localized equivalents of OK, Cancel, etc. |
||||||||||||||
Default button | Select the button that must act as the default button from the drop-down list. The available choices refer to the buttons that you selected for the Buttons field, numbered in the order that the buttons appear in that field. The default button is preselected when the message box appears. If the user presses the Enter key without selecting a different button first, then the default button determines the message box result. Tip: The default button should be the one that returns the preferred or least dangerous result, because many users press Enter without really reading the message box. |
||||||||||||||
Icon | Select the desired message box icon from the drop-down list. The following choices are available:
|
||||||||||||||
Time out | Enter the time-out period for the message box in seconds. If the user doesn't close the message box within the time-out period, it will be closed automatically. In that case, the message box returns the default result as specified by Result (below).
|
||||||||||||||
Result | Select the default message box result from the drop-down list. The available choices correspond to the possible message box buttons and have the same effect on the execution of the parent action sequence (see table above). The default result is returned under the following circumstances:
Tip: The default result is usually one of the buttons that you selected under Buttons. However, this is not required; you may select a Result that is not among the buttons shown in the message box. This is useful if you want to return a different result for a message box that ends because of a time-out or was suppressed during a silent installation, than for one that is closed explicitly by the user. For example, you could create a MessageBox action with Buttons set to OK and Result to Cancel, then select Fail mode (below) Fail if Cancel. This would terminate the installation if the message box timed out or if the installer runs in silent mode, but continue if the user was present and clicked OK to close the message box. |
||||||||||||||
Fail mode | Select the desired installation failure mode for the action. The following choices are available:
|
||||||||||||||
CPU | Select the Windows architectures on which the action must be executed. This CPU selection acts as an additional condition for the action. | ||||||||||||||
Condition | Enter the conditional expression that determines if the action will be executed, or leave empty for unconditional execution. Tip: You do not have to make the MessageBox action conditional upon a silent install (/q or /q2 command line option; TsuQuiet variable > 0); the message box is automatically suppressed if the installer runs in silent mode. Note that this differs from suppressing the action with a condition:
The Condition field takes precedence over the silent install suppression, in that a "false" condition causes the action to be skipped altogether, for silent and interactive installs alike. |
||||||||||||||
Disabled | Check this box to disable the action. A disabled action is not included in the installer and not checked during the build. You can use this option to remove actions temporarily from your installer without permanently deleting them. Disabled actions are shown with a grayed-out icon. |