Setting environment variables

Applies To: Windows Server 2003, Windows Server 2003 R2, Windows Server 2003 with SP1, Windows Server 2003 with SP2

Setting environment variables

Environment variables are strings that contain information such as drive, path, or file name. They control the behavior of various programs. For example, the TEMP environment variable specifies the location in which programs place temporary files.

Any user can add, modify, or remove a user environment variable. However, only an administrator can add, modify, or remove a system environment variable.

Using System in Control Panel, you can customize the following variables:

  • User environment variables for logged_on_user_name

    The user environment variables are different for each user of a particular computer. The variables include any that are set by the user, as well as any variables defined by programs, such as the path to the location of the program files.

  • System environment variables

    Administrators can change or add environment variables that apply to the system, and thus to all system users. During installation, Windows Setup configures the default system variables, such as the number of processors and the location of the temp directories.

Caution

  • Do not add directories to the Path system variable unless you know they are secure because a malicious user could place a Trojan horse or other malicious program in that directory. When executed by Windows, such a file could compromise sensitive data, cause data loss, or cause a partial or total system failure.

See Also

Concepts

Add or change the values of environment variables
System Properties Overview - Control Panel