Environment Variable Settings
InstallShield 2022 » Environment Variables View
Project:The Environment Variables view is available in the following project types:
• | Basic MSI |
• | DIM |
• | InstallScript MSI |
• | Merge Module |
• | MSI Database |
• | MSM Database |
• | Transform |
The InstallScript language includes the GetEnvVar function for retrieving the current value of an environment variable, and it enables you to create an environment variable.
By specifying environment variable settings, you indicate how you want to affect existing variables on the target system and create new variables. Each environment variable property is described below:
Setting |
Description |
|||||||||
Component |
Select the component with which you want to associate this environment variable by using one of the following methods:
The environment variable creation, modification, or removal takes place on the target system when the component that is associated with the environment variable is installed. |
|||||||||
Value |
Enter the path or value for this environment variable. You can use a predefined folder as part of this value—such as [INSTALLDIR]Bin. To enter multiple paths, separate the paths with a semicolon (;). Note:If you select Remove for the On Install setting, InstallShield clears any value entered in the Value setting, and the Value setting becomes read-only. |
|||||||||
On Install |
Indicate the action that you want to take place when the associated component is installed to the target system. Available options are:
Note:If you select Remove for the On Install setting, any value entered in the Value setting is cleared, and the Value setting becomes read-only. |
|||||||||
Placement |
Select the action that you would like to perform. Available options are:
Note:If you select Create for the On Install setting and the specified environment variable already exists on the target system, the Placement setting indicates how the new value should be added to the existing environment variable’s value or if it should replace the existing environment variable’s value. However, if—in this scenario—the specified environment variable does not exist on the target system, it is created and the Placement setting is ignored. |
|||||||||
On Uninstall |
Indicate whether the environment variable should be updated when the associated component is uninstalled. Available options are:
If you select Replace for the Placement setting, and if either of the following conditions are true at uninstallation time, the entire environment variable is removed: the value on the target system matches the specified value, or the value on the target system is empty. In all other cases, the environment variable and its value are left as is on the target system.
|
|||||||||
Type |
Indicate whether the environment variable name refers to a system or user environment variable. Available options are:
|
See Also