Customizing a Check Platform Rule

InstallAnywhere 2020 SP1

By default, the Check Platform rule initially includes all the built-in platforms in the Do Not Perform On list. Hence, without customization, this rule prevents the component to which it is assigned from running. You must move platforms into the Perform On list to define a set of platforms on which the installer, action, file, or folder can run and check if its empty.

To customize the Check Platform rule:

1. Open the customizer of a Check Platform rule.
2. In the Do Not Perform On list, select the platforms on which you want your action or installer to run.
3. Click the right arrow (-->). This moves the selected platforms to the Perform On list.
4. If you want to write a complex rule expression, you can edit the expression in the Rule Expression field to use multiple logical operators (such as AND, OR, and NOT) and precedence operators (parentheses) to express the relationship between two or more rules. For instructions, see Building Complex Rule Expressions.

Note • If the platform on which your installer or action must execute is not one of the built-in platforms, you can create a custom platform expression.

Example: Windows-Only Rule

Some actions may only make sense for Windows systems. Follow the steps below to create a “Windows-only” rule.

To create a Windows-only rule:

1. In the Check Platform customizer, click Windows (All).
2. Click the right arrow (-->).

Note • The Windows (All) rule returns true when the target machine’s Java VM reports any “Windows” value from a System.getProperty (os.name) method call.

Example: Custom Platform Rule

If your installer includes an action that must run on Windows 98 systems but not on any other system, you can create a custom platform expression. The steps in this example below use custom expressions to create such a rule.

To create a custom platform rule:

1. In the Check Platform customizer, click Windows (All).
2. Click Remove Platform. (No Windows systems can produce a true result unless we remove Windows (All) from the Do Not Perform On list.)
3. Click More Platforms. This opens the Add Platform dialog box.
4. In the Add Platform dialog box, type Windows 98 in the text box.
5. Click OK. Windows 98 appears in the Perform On list.

See Also