Delete Environment Variable

Description

Removes a system or user-level environment variable.

Declaration

<AMREMOVEENVIRONMENT NAME="text" TYPE="text [options]" />

Example

<AMREMOVEENVIRONMENT NAME="Custom" TYPE="USER" />

General Tab Parameters

Environment variable name: Specifies the name of the environment variable to remove.

Text, Required
MARKUP: NAME="Custom"

Note: Click the Expression Builder icon to open the Expression Builder dialog box.

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"