Control Condition attributes (MSI)

Reference information
Project page Dialogs and Billboards
Related topics Working with attribute panes
External links External link Windows Installer documentation

Introduction

Control conditions change the enabled/disabled state or visibility of a control subject to a conditional expression. They can be used to change the state of a control based on installation-time information. The control condition is evaluated when the parent dialog box is first shown, and again each time a property in the condition changes its value.

For example, the Next PushButton control in the predefined LicenseAgreementDlg dialog box is enabled or disabled conditional upon the value of the UILicenseAgreed property, which in turn is set or cleared by the I agree... CheckBox control in the same dialog box.

Tip: To change the state of a control in both directions, you must define two separate control conditions. For example, to enable and disable a control based on the value of the UILicenseAgreed property, you must create both an Enable and a Disable control condition, the former with the condition UILicenseAgreed and the latter with the condition NOT UILicenseAgreed.

Tarma note All Tarma Installer controls have a Condition attribute that enables or disables the control depending on the condition, if any. Furthermore, you can use Set Windows State actions for additional control state changes. See Dialog Control Conditions for more information.

Attributes

This pane contains the following attributes and options.

Attribute Description
Control state

Select the desired control state action from the drop-down list. The following choices are available:

  • Default - Make the control the default in the parent dialog box. This is mainly useful for PushButton controls.
  • Enable - Enable the control. An enabled control accepts user input, such as button clicks.
  • Disable - Disable the control. A disabled control appears grayed-out and does not accept user input.
  • Show - Show the control.
  • Hide - Hide the control.
Condition

Enter the condition for the control state change as a conditional expression.