Windows - Environment Variable

> Operating System - Kernel (Windows, Unix, Linux) > Windows (and utilities)

1 - About

An environment variable is an operating system variable that use the hosted application to set application parameters.

They can be set on different scopes:

  1. for a shell thread with the set DOS command (ie for a specific process)
  2. for a specific user
  3. global for a system
Advertising

3 - How to manage an environment variable ?

3.1 - DOS

3.2 - Registry

  • System: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment
  • User: HKEY_CURRENT_USER\Environment

3.3 - GUI

  • Start / Control Panel / (Performance and Maintenance for XP) / System
  • In the Advanced tab, click the Environment Variable button
  • You can enter a environment variable for:
  • a user session
  • of for the complete system (also known as a global environment variable)

3.4 - List

Example: listing of the environment variable of the Outlook process (application) within Process explorer

See process environment variable

Advertising

4 - Built-in Environment variable

%PATH% list of directories where the OS search to find executable binary. See Os - (Search) Path Environment Variable
%temp% Temp Directory
%SYSTEMDRIVE% Disk Drive
os/windows/environment_variable.txt · Last modified: 2018/12/19 20:31 by gerardnico