What are the default environment variables in Windows?

Updated: 12/30/2021 by Computer Hope
Viewing environment variables with the SET command.

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.

Defaults
Windows XP: C:\Documents and Settings\All Users
Windows Vista/7/8/10/11: C:\ProgramData

%APPDATA%

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

Defaults
Windows XP: C:\Documents and Settings\UserName\Application Data
Windows Vista/7/8/10/11: C:\Users\UserName\AppData\Roaming

%CommonProgramFiles%

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

Defaults
Windows XP/Vista/7/8/10/11: C:\Program Files\Common Files

%CommonProgramFiles(x86)%

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

Defaults
Windows XP/Vista/7/8/10/11: C:\Program Files (x86)\Common Files

%CommonProgramW6432%

Only used in 64-bit versions of Windows.

Defaults
Windows Vista/7/8/10/11: C:\Program Files\Common Files

%COMPUTERNAME%

The name of your computer, as set in Control PanelSystemComputer Name.

Defaults
Windows XP/Vista/7/8/10/11: ComputerName

%ComSpec%

Location of the default command interpreter.

Defaults
Windows XP/Vista/7/8/10/11: C:\Windows\System32\cmd.exe

%HOMEDRIVE%

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

Defaults
Windows XP/Vista/7/8/10/11: C:

%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.

Defaults
Windows XP: \Documents and Settings\UserName
Windows Vista/7/8/10/11: \Users\UserName

%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.

Defaults
Windows Vista/7/8/10/11: C:\Users\UserName\AppData\Local

%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%.

Defaults
Windows XP/Vista/7/8/10/11: \\DomainLogonServer

%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.

Defaults
Windows XP/Vista/7/8/10/11: C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;[AdditionalPaths]

%PATHEXT%

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

Defaults
Windows XP: .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.WSF;.WSH
Windows Vista/7/8/10/11: .com;.exe;.bat;.cmd;.vbs;.vbe;.js;.jse;.wsf;.wsh;.msc

%ProgramData%

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

Defaults
Windows Vista/7/8/10/11: %SystemDrive%\ProgramData

%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.

Defaults
Windows XP/Vista/7/8/10/11: %SystemDrive%\Program Files

%ProgramFiles(x86)%

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

Defaults
Windows XP/Vista/7/8/10/11: %SystemDrive%\Program Files (x86)

%ProgramW6432%

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

Defaults
Windows Vista/7/8/10/11: %SystemDrive%\Program Files

%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.)

Defaults
Windows XP/Vista/7/8/10/11: $P$G

%PSModulePath%

Location of modules used by Windows PowerShell.

Defaults
Windows Vista/7/8/10: %SystemRoot%\system32\WindowsPowerShell\v1.0\Modules\
Windows 11: %ProgramFiles%\WindowsPowerShell\Modules\;C:\Windows\system32\WindowsPowerShell\v1.0\Modules\

%PUBLIC%

Location of the Public user profile.

Defaults
Windows Vista/7/8/10/11: %SystemDrive%\Users\Public

%SystemDrive%

The drive letter of the volume where Windows is installed.

Defaults
Windows XP/Vista/7/8/10/11: C:

%SystemRoot%

The directory containing the Windows system.

Defaults
Windows XP: C:\Windows or, in older systems, C:\WINNT
Windows Vista/7/8/10/11: %SystemDrive%\Windows

%TEMP%
%TMP%

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

Defaults
Windows XP: %SystemDrive%\Documents and Settings\UserName\Local Settings\Temp
Windows Vista/7/8/10/11: %SystemRoot%\TEMP (for system processes)
%USERPROFILE%\AppData\Local\Temp (for user processes)

%USERDOMAIN%

The domain of where the current user belongs.

Defaults
Windows XP/Vista/7/8/10/11: UserDomain

%USERNAME%

The name of the current user.

Defaults
Windows XP/Vista/7/8/10/11: UserName

%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).

Defaults
Windows XP: %SystemDrive%\Documents and Settings\UserName
Vista/7/8/10/11: %SystemDrive%\Users\UserName

%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).

Defaults
Windows XP: %SystemDrive%\WINDOWS
Vista/7/8/10: %SystemDrive%\WINDOWS