Append Environment Variable

Description

Appends new value to the current value of environment variable. If the variable does not exist then it will create the environment variable and set it with the append value.

Declaration

<AMAPPENDENVIRONMENT NAME="text" TYPE="text [options]" VALUE="text" RESULTVARIABLE="text [variable name]" />

Example

<AMAPPENDENVIRONMENT NAME="TEMP" TYPE="USER" VALUE="\subtemp" RESULTVARIABLE="VariableName2" />

General Tab Parameters

Environment variable name: Specifies the name of the environment variable to which the text will be appended.

Text, Required
MARKUP: NAME="Temp"

Environment variable scope: Specifies the scope of the environment variable. The available options are:

  • User -The environment variable is stored or retrieved from the HKEY_CURRENT_USER\Environment key in the Windows operating system registry. When the user creates the environment variable in a set operation, the operating system stores the environment variable in the system registry, but not in the current process. If the user starts a new process, the operating system copies the environment variable from the registry to that process. When the process terminates, the operating system destroys the environment variable in that process. However, the environment variable in the registry persists until the user removes it using a program or by means of an operating system tool.

  • Machine - The environment variable is stored or retrieved from the HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment key in the Windows operating system registry. When a user creates the environment variable in a set operation, the operating system stores the environment variable in the system registry, but not in the current process. If any user on the local computer starts a new process, the operating system copies the environment variable from the registry to that process. When the process terminates, the operating system destroys the environment variable in that process. However, the environment variable in the registry persists until a user removes it using a program or by means of an operating system tool.

  • Process - The environment variable is stored or retrieved from the environment block associated with the current process. The user creates the environment variable in a set operation. When the process terminates, the operating system destroys the environment variable in that process.

Text [options], Optional - Default "User"
MARKUP: TYPE="User"

Text to append: Specifies the text to be appended to the value of the environment variable.

Text, Required
MARKUP: VALUE="new text"

Populate variable with the value: Specifies a variable to populate with the resulting value.

Text [variable name], Optional
MARKUP: RESULTVARIABLE="VariableName"