In Microsoft Windows, environment variables contain configuration values for the entire system and the current user. On this page, are the default names and values of the environment variables used by Windows XP, Vista, 7, 8, 10, and 11.

%ALLUSERSPROFILE%

The full path of the All Users profile directory, which contains default profile information shared by every user.

%APPDATA%

Location of AppData hidden folder, used by some installed programs to store user application data.

%CommonProgramFiles%

Location of the Common Files directory. This folder contains files for common programs and utilities on a computer, mostly system and services related.

%CommonProgramFiles(x86)%

Location of the Common Files directory used by 32-bit programs. Only used in 64-bit versions of Windows.

%CommonProgramW6432%

Only used in 64-bit versions of Windows.

%COMPUTERNAME%

The name of your computer, as set in Control Panel → System → Computer Name.

%ComSpec%

Location of the default command interpreter.

%HOMEDRIVE%

The drive letter assigned to the volume which contains your user profiles.

%HOMEPATH%

The path, minus the drive letter, of the current user’s profile directory.

The %local% environment variable points to where the security policies & rules are located for the user’s account. This environment variable is native to Windows 7.

%LOCALAPPDATA%

Location of the Local subfolder of AppData, used by some installed programs to store user data. Common temporary files to be stored here are desktop themes, Windows error reporting, program caching and Internet browser profiles.

%LOGONSERVER%

The network location of the logon server. In corporate settings, DomainLogonServer is a Windows logon server on the corporate network domain. For regular users, DomainLogonServer is %COMPUTERNAME%.

%PATH%

List of paths, delimited by a semicolon, to be automatically searched for files. Specifically, files with an extension listed in %PATHEXT% are looked for in %PATH% if they are not found in the current directory. Paths are searched in the order listed.

%PATHEXT%

Files with these extensions, if not found in the current directory, are looked for in %PATH%.

%ProgramData%

Location of the ProgramData hidden folder, used by some installed programs to store user data.

%ProgramFiles%

Location of the Program Files directory, the default location of installed programs. On 64-bit versions of Windows, this directory is the default location of 64-bit programs.

%ProgramFiles(x86)%

The default location of 32-bit programs. This variable is only present in 64-bit versions of Windows.

%ProgramW6432%

This variable is used by the WOW64 emulation layer, and is only present in 64-bit versions of Windows.

%PROMPT%

A string of special codes that define the current command prompt. Here, $P represents the current drive and directory, and $G represents the greater-than symbol. (For more information, see the PROMPT command.)

%PSModulePath%

Location of modules used by Windows PowerShell.

%PUBLIC%

Location of the Public user profile.

%SystemDrive%

The drive letter of the volume where Windows is installed.

%SystemRoot%

The directory containing the Windows system.

%TEMP%%TMP%

The default location of temporary files. The files located in this directory can be deleted periodically to help improve computer performance.

%USERDOMAIN%

The domain of where the current user belongs.

%USERNAME%

The name of the current user.

%USERPROFILE%

The path to the current user’s profile directory where the current logged in user’s profile data is stored. It’s in this directory that a user can find the following folders: My Documents, My Music, My Pictures, Desktop, and Favorites (Internet Explorer bookmarks).

  • How to open your user profile folder in Windows.

%windir%

A modern equivalent of/replacement for %SystemRoot%. This directory is where Windows will install. The default directory path for most versions of Windows is c:\Windows (for Windows NT 4 and 2000, it is c:\WinNT).

  • How to set the path and environment variables in Windows.
  • SET command – set and view Windows environment variables from the command line.
  • How to open your user profile folder in Windows.
  • Microsoft Windows help and support.