InstallAware for Windows Installer Header Image Windows Installer without Rocket Science
InstallAware for Windows Installer
 

Set Variable

The Set Variable command declares a variable, and initializes it to a particular value. If the variable was previously declared, it takes on the new value specified by the command. Variables must be explicitly declared before they can be used in If commands, dialog boxes, or plug-in actions. Commands that write to variables automatically declare them, as long as the command is not dependent on the input value of the variable.

Set Variable

Type the name of the variable to define or re-initialize.

To Value

Type the value for the variable. Leave the field empty to set the variable equal to an empty string.

Remember value when restarting setup

Except for the pre-defined variables TARGETDIR, STARTMENU and ALLUSERS, setup does not save the value of the variables you use in your setup. If you would like setup to save the values of your variables, so they are initialized to the last value they had when setup was running, check this box. If not, leave this box unchecked.

 Notes

  • When the Remember value when restarting setup box is checked, variables will not be saved when setup exits after an uninstallation (when Apply Changes is called with the Uninstall Product option).
  • In all other instances, including starting setup but not fully completing the installation (for instance, due to an interim reboot caused by the Reboot and Resume command), variables will be saved.
  • If setup uninstalls and then reinstalls, variable values will be saved again.
  • After the Set Variable command executes with the Remember value when restarting setup box checked at least once for a given variable, that variable will always be saved (within the guidelines discussed above). It is not necessary to check the same box for future uses of the Set Variable command on that same variable.