Windows 10-11 Default Environment Variables
Windows 10-11 Default Environment Variables
%ALLUSERSPROFILE% C:\ProgramData
%APPDATA% C:\Users\{username}\AppData\Roaming
%COMSPEC% C:\Windows\System32\cmd.exe
%HOMEDRIVE% C:\
%HOMEPATH% C:\Users\{username}
%LOCALAPPDATA% C:\Users\{username}\AppData\Local
%LOGONSERVER% \\{domain_logon_server}
%PATH% C:\Windows\system32;C:\Windows;C:\Windows\Sy
stem32\Wbem
%PathExt% .com;.exe;.bat;.cmd;.vbs;.vbe;.js;.jse;.wsf;.wsh;.ms
c
%PROGRAMDATA% C:\ProgramData
%PROMPT% $P$G
%SystemDrive% C:
%SystemRoot% C:\Windows
%TEMP% C:\Users\{username}\AppData\Local\Temp
%TMP% C:\Users\{username}\AppData\Local\Temp
%USERNAME% {username}
%USERPROFILE% C:\Users\{username}
%WINDIR% C:\Windows
%PUBLIC% C:\Users\Public
%PSModulePath% %SystemRoot%\system32\WindowsPowerShell\v1.
0\Modules\
%OneDrive% C:\Users\{username}\OneDrive
%DriverData% C:\Windows\System32\Drivers\DriverData
%OS% Windows_NT
Although you can use environment variables to access certain locations within Windows 11 quickly, you’ll
typically use these variables when building a script or an application.
Keep in mind that some of the variables mentioned are not location-specific, including %COMPUTERNAME%,
%PATHEXT%, %PROMPT%, %USERDOMAIN%, %USERNAME%.
You can always view all the environment variables available on your device using the Get-ChildItem
Env: | Sort Name PowerShell command.
While this guide is focused on Windows 10 and 11, it’s important to note that these variables will also work
on Windows 8.1, Windows 7, and Windows Vista.
For example, instead of browsing a path like “C:\Users\UserName\AppData\Roaming,” you can open the
“Run” command, type this variable “%APPDATA%,” and press Enter to access the same path. Or you
can use the “%HOMEPATH%” variable to access the current user’s default profile folder location (where
the system stores the folders for Desktop, Documents, Downloads, and OneDrive).