ISWiEnvironmentVar Object

InstallShield 2016 » Automation Interface

Project • This information applies to the following project types:

Basic MSI
DIM
InstallScript MSI
Merge Module

ISWiEnvironmentVar represents an environment variable that belongs to a component. The file can be an existing one from the InstallShield user interface or one added by calling AddEnvironmentVar.

Members

ISWiEnvironmentVar Object Members

Name

Type

Description

EnvType

Read-Write Property

This enumerated integer property specifies whether the environment variable name refers to a system or user environment variable:

evtSystem—Creates, modifies, or removes the specified system environment variable.
evtUser—Creates, modifies, or removes the environment variable from the user’s environment. The specified environment variable is available only to the end user who is logged on at the time of installation.

Key

Read-Only Property

Stores the key of the Environment table.

Name

Read-Write Property

Retrieves or sets the name of the environment variable.

OnInstall

Read-Write Property

This enumerated integer property retrieves or sets the action that you want to occur when the associated feature is installed to the target system:

evoiSet—In conjunction with the Placement property, sets the value of an existing environment variable. This option creates the environment variable if it does not already exist on the target system, and then it sets it during installation. If the environment variable exists on the target system, it is set during the installation.
evoiCreate—Creates the specified environment variable on the target system if it does not already exist, and it sets the variable’s value.
evoiRemove—Removes the specified environment variable from the target system.

OnUninstall

Read-Write Property

This enumerated integer property specifies whether this environment variable should be removed from the target system when the associated feature is uninstalled:

evouRemove—Removes the environment variable or its appended value from the target system if the associated feature is uninstalled. If the value of the OnInstall property is Create, the Remove value for OnUninstall removes the entire environment variable. If the value of the OnInstall property is Set, the Remove value for OnUninstall removes only the value that was appended to the variable’s value.
evouLeave—Leaves the environment variable or its appended value on the target system if the associated feature is uninstalled.

Placement

Read-Write Property

This enumerated integer property retrieves or sets the placement of the value in the Value field relative to the specified environment variable’s existing value:

evpAppend—Appends the value indicated in the Value property to the end of the specified environment variable’s existing value.
evpPrefix—Adds the value indicated in the Value property to the beginning of the specified environment variable’s existing value.
evpReplace—Replaces the value of the specified environment variable with the value indicated in the Value property.

Value

Read-Write Property

Retrieves or sets the path or value for this environment variable.

Applies To

ISWiComponent