Setting Variables in the Advanced Designer

InstallAnywhere 2017

The Advanced Designer provides two actions specifically for setting InstallAnywhere variables: Set InstallAnywhere Variable - Single Variable and Set InstallAnywhere Variable - Multiple Variables. Both actions require you to provide a variable name and value for each variable. In addition, you can choose to set the variable to be evaluated at assignment or resolved each time the variable is referenced.

Adding a Set InstallAnywhere Variable - Single Variable Action

To add a Set InstallAnywhere Variable - Single Variable action:

1. In the Advanced Designer, on the Sequence page, click the appropriate sequence: Pre-Install, Post-Install, Pre-Uninstall, or Post-Uninstall. The corresponding view opens.
2. Click the Add Action button. The Choose an Action dialog box opens.
3. Click the Set InstallAnywhere Variable - Single Variable action, and then click the Add button. InstallAnywhere adds the action to the list and displays its actions in the customizer at the bottom of the view.
4. Configure the action’s settings as needed:
a. In the Variable Name box, enter a name that identifies this variable.
b. In the Set Value To box, enter the value that you want to set for this variable.
c. To set this variable to evaluate at assignment, select the Evaluate any variables at assignment check box.
d. To avoid the substitution of unknown variables for this action by instructing InstallAnywhere to resolve only InstallAnywhere variables that are listed in the Variables view on the Project page of the project (the known variables), select the Do not substitute unknown variables check box. For more information, see Preventing the Substitution of Unknown Variables.

Adding a Set InstallAnywhere Variable - Multiple Variables Action

To add a Set InstallAnywhere Variable - Multiple Variables action:

1. In the Advanced Designer, on the Sequence page, click the appropriate sequence: Pre-Install, Post-Install, Pre-Uninstall, or Post-Uninstall. The corresponding view opens.
2. Click the Add Action button. The Choose an Action dialog box opens.
3. Click the Set InstallAnywhere Variable - Multiple Variable action, and then click the Add button. InstallAnywhere adds the action to the list and displays its actions in the customizer at the bottom of the view.
4. Click the Edit Variables button. The Edit Multiple Variables dialog box opens.
5. Add a new variable:
a. Click the Add button. InstallAnywhere adds a blank row to the list of variables.
b. In the Variable Name column, enter a name for the variable.
c. In the Value column, enter the value you want to set for this variable.
d. To set this variable to evaluate at assignment, select the Evaluate any variables at Assignment check box.
6. To add additional variables, repeat step 5.
7. When you have finished adding variables, click OK. The Edit Multiple Variables dialog box closes, and InstallAnywhere adds the variables that you added to the variables list.
8. To avoid the substitution of unknown variables for this action by instructing InstallAnywhere to resolve only InstallAnywhere variables that are listed in the Variables view on the Project page of the project (the known variables), select the Do not substitute unknown variables check box. For more information, see Preventing the Substitution of Unknown Variables.