Standard InstallAnywhere Variables

InstallAnywhere 2018

InstallAnywhere includes a number of default variables that store information that is essential to the installation process. The following variables are standard InstallAnywhere variables:

Standard InstallAnywhere Variables

Variable

Description

Status

$;$ or $:$

The $;$ and $:$ variables represent platform-specific path separators.

Read-only

$/$ or $\$

The $/$ and $\$ variables represent platform-specific directory separators, most useful to refer to paths in a platform-independent manner. These variables have the same value as the Java property file separator.

Read-only

$CHOSEN_DIALOG_BUTTON$

The $CHOSEN_DIALOG_BUTTON$ variable reflects the return value set by the end user’s choice in the Show Message dialog box action. If, for example, the end user chooses button 1, this variable is set to 1.

Read-write

$CHOSEN_FEATURE_LIST$

The $CHOSEN_FEATURE_LIST$ variable is a comma-separated list of all the end user–selected features (short names).

You can alter the features that will be installed by altering the value of this variable; however, you must understand that the string value of this variable does not clearly represent feature dependencies or parent-child relationships. You can infer these relationships from the string value of $CHOSEN_FEATURE_LIST$ if you fully understand the relationships between the installer's features and the function of the Choose Install Set panel.

Installers interpret the string value of this variable and discard values that do not make sense. Hence, if you add a feature that does not exist in the installer, that portion of the $CHOSEN_FEATURE_LIST$ is ignored. Likewise if you alter this string in a way that violates feature dependencies or parent-child relationships, you may get a different result when you read back the value of this variable.

Note • Use this variable, along with $CHOSEN_FEATURE_n$ and $CHOSEN_FEATURE_NUM$, to track the features that your end users select during install and uninstall.

A similar set of variables exists ($CHOSEN_INSTALL_FEATURE_LIST$, $CHOSEN_INSTALL_FEATURE_NUM$, $CHOSEN_INSTALL_FEATURE_n$, and $FEATURE_UNINSTALL_LIST$). However, you can use the CHOSEN_FEATURE set of variables at install and uninstall by specifying features’ short names, which are not localizable and thus serve as consistent IDs, regardless of the locale in which the installer or uninstaller is running.

Read-write

$CHOSEN_FEATURE_n$

One $CHOSEN_FEATURE_n$ variable is created for each feature counted in the variable $CHOSEN_FEATURE_NUM$. These variables hold the short name of a feature to be installed.

For example, if $CHOSEN_FEATURE_NUM$ equals 2, two variables of this form are created: $CHOSEN_FEATURE_1$ and $CHOSEN_FEATURE_2$.

Note • Use this variable, along with $CHOSEN_FEATURE_LIST$ and $CHOSEN_FEATURE_NUM$, to track the features that your end users select during install and uninstall.

A similar set of variables exists ($CHOSEN_INSTALL_FEATURE_LIST$, $CHOSEN_INSTALL_FEATURE_NUM$, $CHOSEN_INSTALL_FEATURE_n$, and $FEATURE_UNINSTALL_LIST$). However, you can use the CHOSEN_FEATURE set of variables at install and uninstall by specifying features’ short names, which are not localizable and thus serve as consistent IDs, regardless of the locale in which the installer or uninstaller is running.

Read-write

$CHOSEN_FEATURE_NUM$

This variable holds the total number of features (as a string) that the end user chooses to install.

For example, if the end user chooses 3 features during the install, the value of CHOSEN_FEATURE_NUM is 3, and the short names of these features can be referenced in the variables $CHOSEN_FEATURE_1$, $CHOSEN_FEATURE_2$, and $CHOSEN_FEATURE_3$.

Note • Use this variable, along with $CHOSEN_FEATURE_n$ and $CHOSEN_FEATURE_LIST$, to track the features that your end users select during install and uninstall.

A similar set of variables exists ($CHOSEN_INSTALL_FEATURE_LIST$, $CHOSEN_INSTALL_FEATURE_NUM$, $CHOSEN_INSTALL_FEATURE_n$, and $FEATURE_UNINSTALL_LIST$). However, you can use the CHOSEN_FEATURE set of variables at install and uninstall by specifying features’ short names, which are not localizable and thus serve as consistent IDs, regardless of the locale in which the installer or uninstaller is running.

Read-write

$CHOSEN_INSTALL_BUNDLE_LIST$

This variable is a comma-separated list of all install features (short name) chosen for the installation.

Note • This variable is deprecated. Instead, use $CHOSEN_INSTALL_FEATURE_LIST$.

Read-only

$CHOSEN_INSTALL_BUNDLE_n$

If Choose Product Features is enabled, one instance of $CHOSEN_INSTALL_BUNDLE_n$ is created for each feature as given in the variable $CHOSEN_INSTALL_BUNDLE_NUM$. This holds the short name of a feature to be installed.

For example, if $CHOSEN_INSTALL_BUNDLE_NUM$ equals 2, then two variables of this form are created: $CHOSEN_INSTALL_BUNDLE_1$ and $CHOSEN_INSTALL_BUNDLE_2$.

Note • This variable is deprecated. Instead, use $CHOSEN_INSTALL_FEATURE_n$.

Read-only

$CHOSEN_INSTALL_BUNDLE_NUM$

If Choose Product Features is enabled, this variable holds the total number of components (as a string) that the end user chooses to install.

Note • This variable is deprecated. Instead use $CHOSEN_INSTALL_FEATURE_NUM$.

Read-only

$CHOSEN_INSTALL_FEATURE_LIST$

This variable is a comma-separated list of all the 'selected' features (short names). You can alter the features that will be installed by altering the value of this variable; however, you must understand that the string value of this variable does not clearly represent feature dependencies or parent-child relationships.

(You can infer these relationships from the string value of $CHOSEN_INSTALL_FEATURE_LIST$ if you fully understand the relationships between the installer's features and the function of the Choose Install Set panel.)

In order to preserve the functional continuity of the graphical installer and any automation efforts that use InstallAnywhere variables, installers interpret the string value of this variable and discard values that do not make sense. Hence, if you add a feature that does not exist in the installer, that portion of the $CHOSEN_INSTALL_FEATURE_LIST$ is ignored. Likewise if you alter this string in a way that violates feature dependencies or parent-child relationships, you may get unexpected results.

Read-write

$CHOSEN_INSTALL_FEATURE_n$

If Choose Product Features is enabled, one $CHOSEN_INSTALL_FEATURE_n$ variable is created for each feature as given in the variable $CHOSEN_INSTALL_FEATURE_NUM$. These variables hold the short name of a feature to be installed. For example, if $CHOSEN_INSTALL_FEATURE_NUM$ equals 2, then two variables of this form are created: $CHOSEN_INSTALL_FEATURE_1$ and $CHOSEN_INSTALL_FEATURE_2$.

Read-write

$CHOSEN_INSTALL_FEATURE_NUM$

If Choose Product Features is enabled, this variable holds the total number of features (as a string) that the end user chooses to install.

Read-write

$CHOSEN_INSTALL_SET$

If Choose Product Features is enabled, this variable holds the short name of the install set chosen by the end user. If the end user chose to customize the install, this variable holds the string CUSTOM.

Set before install time

$CMD_LINE_ARGUMENTS$

A special InstallAnywhere variable resolved by the launcher and not by the installer. If this variable is in the LAX property lax.command.line.args, it resolves to the arguments that are sent to the LaunchAnywhere executable.

Used by LaunchAnywhere

$COMMA$

This resolves to a comma (,).

Read-only

$componentname_DEPENDENCY_STATE_VARIABLE$

If the dependency check passes this variable contains an empty string. If the dependency check fails, the variable contains the Dependency Failed Message.

Set at the beginning of the Install phase or after the Evaluate Dependencies action in Pre-Install.

Read-write

$componentname_MATCHED_KEY_FILE$

This variable contains the location of where the key file of the dependency is installed. If the dependency check has failed, this variable contains an empty string.

Set at the beginning of the Install phase or after the Evaluate Dependencies action in Pre-Install.

Read-write

$DEPENDENCY_FAILURES$

This is a comma-separated list of Dependencies that have failed and are not installed.

Set at the beginning of the Install phase or after the Evaluate Dependencies action in Pre-Install.

Read-write

$DEPENDENCY_REPORT$

This variable contains a report of all the dependencies that have failed.

Set at the beginning of the Install phase or after the Evaluate Dependencies action in Pre-Install.

Read-write

$DEPENDENCY_STATUS$

Returns success or failure, depending on the entire dependency evaluation. If any of the dependencies in the installer fail, this variable is set to failure.

Set at the beginning of the Install phase or after the Evaluate Dependencies action in Pre-Install.

Read-write

$DEPENDENCY_SUCCESSES$

This is a comma-separated list of Dependencies that have passed and are installed.

Set at the beginning of the Install phase or after the Evaluate Dependencies action in Pre-Install.

Read-write

$DEVELOPER_DISK_SPACE_ADDITIONAL$

This variable specifies an arbitrary additional value, as a string representing the additional bytes, that the Disk Space Check action then adds to the computed required disk space for the installation. By default this variable has a value of zero.

Read-write

$DOLLAR$

This resolves to $.

Read-only

$EMPTY_STRING$

This variable represents a value of null. This makes $EMPTY_STRING$ useful to determine whether any variables have been initialized. Variables that have not yet been initialized will have this as their value.

Read-only

$EXTRACTOR_DIR$

The full path to the directory from where the self-extractor executable file was launched.

$EXTRACTOR_DIR$ is available for the following target systems:

AIX
HP-UX
Linux
Solaris
UNIX
Windows

See also the $INSTALLER_LAUNCH_DIR$ variable, which is available for macOS or OS X–based installers and pure Java–based installers.

Read-only

$EXTRACTOR_EXECUTABLE$

The full path to the self-extractor executable file in the location where it was launched.

Read-only

$FEATURE_UNINSTALL_LIST$

The $FEATURE_UNINSTALL_LIST$ a comma-delimited list of features (display name, not short name) that the end user chose to uninstall.

Read-write

$FREE_DISK_SPACE_BYTES$

$FREE_DISK_SPACE_KILOBYTES$

$FREE_DISK_SPACE_MEGABYTES$

$FREE_DISK_SPACE_GIGABYTES$

The free disk space available on the destination install volume, as a string representing the free bytes, as determined by the Disk Space Check action. The variable gains its value immediately before the installation of any files or folder listed in the Install sequence.

Read-only

$IA_BROWSE_FOLDERS$

Controls the use of Swing or native resources for rendering the Browse for Folder dialog box.

For more information, see $IA_BROWSE_FOLDERS$ Variable.

Read-write

$IA_CLASSPATH$

The classpath as specified in the InstallAnywhere Advanced Designer environment.

You can set this in the Advanced Designer

$IA_INSTALL_LOG$

Setting this variable generates an XML-formatted installation log in the $USER_INSTALL_DIR$ location. The log details the installation along with warnings and errors.

Read-only

$IA_MAINTENANCE_MODE$

This variable identifies whether the uninstaller is running in maintenance mode:

TRUE—The uninstaller is running in maintenance mode.
FALSE or empty—The uninstaller is running in standard mode.

Read-write

$IA_MAINTENANCE_OPTION$

If the uninstaller is running in maintenance mode ($IA_MAINTENANCE_MODE$=TRUE), this variable identifies which mode was selected:

ADD—Add Features mode.
REMOVE—Remove Features mode.
REPAIR—Repair Features mode.
UNINSTALL—Uninstall mode.

Read-write

$IA_RESPONSEFILE_PATH$

Stores the complete location of a response file being used by the installer.

Read-write

$IA_ROLLBACK$

Used when the Installer starts to roll back an installation either on cancel or when encountering a fatal error.

Is set to TRUE when a rollback is triggered, or when custom code encounters an exception of type FatalInstallException. Otherwise, it is set to FALSE or is empty.

Read-write

$INSTALL_LOG_DESTINATION$

As the creation of the install log is the last action of an installation, this variable can be set anytime during Pre-Install, Install, or Post-Install. The end user input can choose the installation log location.

Read-write

$INSTALL_LOG_NAME$

This variable sets the name of the installation log. If not set, the installation log name is based on the product name.

Read-write

$INSTALL_SUCCESS$

This variable alerts the end user if the installation was successfully completed or if it failed. Available values for this variable are:

SUCCESS
WARNING
NONFATAL_ERROR
FATAL_ERROR

Read-only

$INSTALLER_LAUNCH_DIR$

The full path to the directory from where the self-extractor executable file was launched.

This variable is available for pure Java–based installers and macOS or OS X–based installers.

See also the $EXTRACTOR_DIR$ variable, which is available for other platforms.

Read-only

$INSTALLER_LOCALE$

The locale as a string (see java.util.Locale.toString()) that the end user selected at the beginning of the installation.

Read-only

$INSTALLER_TITLE$

This is the title of the installer; it is displayed in the title bar.

Read-write

$INSTALLER_UI$

This resolves to the UI mode for the installer.

Note • The $INSTALLER_UI$ variable is case-sensitive when used in a rule, but is not case-sensitive when used in a response file:

Rule—If you use the $INSTALLER_UI$ variable in a rule, the second operand in the comparison, between the $INSTALLER_UI$ variable and a valid value, is case-sensitive. In this scenario, $INSTALLER_UI$=SILENT evaluates correctly, but $INSTALLER_UI$=silent does not evaluate correctly.
Response file—If you use the $INSTALLER_UI$ variable in a response file and pass the response file to the installer, $INSTALLER_UI$=silent evaluates correctly.

Read-only, but you can set it at the start.

$JAVA_DOT_HOME$

This is what the Java property java.home reports.

Read-only

$JAVA_EXECUTABLE$

This is the path to the chosen Java executable.

Read-only

$JAVA_HOME$

This is the root of the Java installation.

Read-only

$JDK_HOME$

This is the path to the root of a JDK installation. This variable is set only if the chosen VM is a JDK. If it is not a JDK, then this variable is blank.

Read-only

$lax.nl.env.ENVIRONMENT_
VARIABLE_NAME$

Note • Windows and UNIX only.

Access any system environment variable (for example, access PATH via $lax.nl.env.PATH$) by specifying the variable name as an all uppercase string. These variables are resolved at application runtime, when LaunchAnywhere executes. Developers can also access system environment variables via LaunchAnywhere properties.

Read-only

$lax.nl.env.exact_case.
ENVIRONMENT_VARIABLE_NAME$

Note • Windows and UNIX only.

Access any system environment variable (for example, access Path via $lax.nl.env.exact_case.Path$) by specifying the variable name as a string of the exact case as it is defined in the environment. Note that these variables are resolved at application runtime when LaunchAnywhere executes. Developers can also access system environment variables via LaunchAnywhere properties.

Read-only

$NEVER_UNINSTALLS_VM$

Tells the uninstaller to never uninstall a Java Virtual Machine. This is useful when multiple projects and uninstallers share one virtual machine.

Set to TRUE to never uninstall a JVM.

Read-write

$NULL$

This is equivalent to $EMPTY_STRING$.

Read-only

$PRODUCT_ID$

Resolves to the value of the Product Code setting (Project page > General Settings view).

Read-only

$PRODUCT_NAME$

This is the product name.

Read-write

$PRODUCT_VERSION_NUMBER$

Resolves to the value of the Product Version (Project page > General Settings view).

Read-only

$PROMPT_USER_CHOSEN_OPTION$

This variable reflects the return value set by the end user’s choice in the Show Message Console dialog box action. If the end user chooses Option 1, this variable is set to 1.

Read-only

$prop.JAVA_PROPERTY$

Access any Java property through InstallAnywhere Variables. An example is $prop.os.name$ which returns the value of the os.name property.

Read-only

$REGISTER_UNINSTALLER_WINDOWS$

This variable tells the uninstaller if it should register itself with Windows Add/Remove Programs.

Set to FALSE to not have the uninstaller register.

Read-write

$REQUIRED_DISK_SPACE_BYTES$

$REQUIRED_DISK_SPACE_KILOBYTES$

$REQUIRED_DISK_SPACE_MEGABYTES$

$REQUIRED_DISK_SPACE_GIGABYTES$

The disk space required by the installer, as a string representing the required bytes, as determined by the Disk Space Check action. The variable gains its value immediately before the installation of any files or folder listed in the Install sequence.

Read-only

$RESTART_NEEDED$

This variable tells the installer or uninstaller whether the Windows-based target system needs to be restarted to complete the installation or uninstallation. A restart may be recommended or required in the following conditions:

The installer or uninstaller is attempting to modify, rename, or delete a file that is locked.
The installer or uninstaller is attempting to copy or move a file to a location that is locked.
The installer or uninstaller is attempting to clean up associated temporary files or folders but one or more of those temporary items are locked.

Available values are:

NO—A restart is not needed.
YES_RECOMMENDED—This value indicates that the installer or uninstaller is encountering locked files or folders.
YES_REQUIRED—This value indicates that the installer or uninstaller is encountering locked files or folders through InstallShield MultiPlatform API Win32Service code, and the code indicates that a restart is required.

Read-Write

$SHORTCUT_NAME$

This variable resolves to “Shortcut” on Windows-based systems, “Alias” on macOS or OS X–based systems, and “Link” on all other systems.

Read-only

$SKIP_UNINSTALL$

Tells the uninstaller whether to perform the uninstall step. To cause the uninstaller to skip the uninstall step, set $SKIP_UNINSTALL$ to true. To allow the uninstall step to occur, set $SKIP_UNINSTALL$ to false. ($SKIP_UNINSTALL$ is false by default.) If the installer skips the uninstall step, it sets $UNINSTALL_SUCCESS$ to SKIPPED.

Note • The Uninstall Complete panel tests the value of $UNINSTALL_SUCCESS$ variable and provides controls for you to customize the message the panel shows in the event that the uninstall step was intentionally skipped.

Read-write

$UNINSTALL_SUCCESS$

The same as $INSTALL_SUCCESS$, but for the uninstaller. Available values are:

SUCCESS
SKIPPED
INCOMPLETE

Read-only

$UNINSTALLER_TITLE$

This is the title of the uninstaller displayed in the title bar.

Read-write

$IA_INSTANCE_MANAGEMENT_OPTION$

This variable is set by the choice an end user makes on the Manage Instances dialog box (or equivalent console panel), or during an upgrade. Available values are:

NEW—Indicates that the end user chose the Install a New Instance option.
MODIFY—Indicates that the end user chose the Modify an Existing Instance option.
NOT_DEFINED (or empty)—Variable is not defined.

This variable is also used in upgrade mode. In upgrade mode, the value of this variable is:

UPGRADE—Indicates that an instance is being upgraded.

Note • This is a read-only value that is you can use as a standard InstallAnywhere variable. This variable is not serialized into the installvariables.properties file or the response files.

Read-only

$IA_INSTANCE_MODIFY_PATH$

This variable is set when the end user specifies the path to an instance that they want to modify on the Manage Instances dialog box (or equivalent console panel). Available values are:

[Path to instance being modified]—When the user has chosen an instance to modify
NOT_DEFINED (or empty)—Variable is not defined.

Note • This is a read-only value that is you can use as a standard InstallAnywhere variable. This variable is not serialized into the installvariables.properties file or the response files.

Read-only

$IA_INSTALL_INSTANCE_NUM$

This variable reflects the number of the instance of the product that is being installed. Available values are:

[Number of the instance being installed]—The number of the instance of the product currently being installed
NOT_DEFINED (or empty)—Variable is not defined.

Note • This is a read-only value that is you can use as a standard InstallAnywhere variable. This variable is not serialized into the installvariables.properties file or the response files.

Read-only

$IA_UPGRADE_BASE_VERSION$

This variable indicates the version number of the base version that is being updated.

Read-only

$IA_UPGRADE_BASE_LOCATION$

This variable indicates the version number of the base product that is being updated.

Read-only