Windows - Environment Variable

Windows 95 Wallpaper Version

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

How to manage an environment variable ?

DOS

See Dos - (Environment) Variable

Registry

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

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)

Environment Variable

List

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

See process environment variable

Windows Environment Parameters By Process Explorer

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
Task Runner