Featured Image List Of Windows Environment Variables

Windows environment variables are commonly used short-cut commands to open a folder path in Windows. Whether you want to locate specific folders or troubleshoot a bug, you can perform these tasks quickly by typing environment variables in Run menu or Command Prompt. The following is a complete list of system and user environment variables in Windows 10 and Windows 11.

What are Windows Environment Variables?

Environment variables in Windows are commands that launch a folder path using a brief text string within percent sign characters (%). The “environment” here refers to the runtime in which a program is executed. In fact, the purpose of these commands is to impact various running processes on your computer.

Popular environment variable examples are “%AppData%,” “DriverData%,” “%temp%,” and “%WinDir%.” You would have used them in Run menu or Command Prompt without actually knowing that they’re called environment variables.

How to Access Environment Variables in Windows

It’s very easy to check all the environment variables present on a Windows device.

  1. Launch “View advanced system settings” using the Search button (magnifying glass-looking one) in Windows.
List Environment Variables View Advanced System Settings
  1. Alternatively, open Settings using  Win +  I, tap on System -> About -> Advanced system settings”.
  2. Go to the “Advanced” tab and click “Environment Variables” under “Startup and Recovery”.
List Environment Variables Accessing Environment Variables Windows11

System vs. User Environment Variables

From the above menu option, you can see all the default/standard environment variables at one place. These are further classified into two categories:

  • User environment variables: these refer to user-centric file and folder paths. You can add shortcuts to any program you use such as OneDrive, Microsoft Office, Xbox PC app, and more. You can freely edit and even delete the contents of the user environment variables.
  • System environment variables: these are the system-centric file and folder paths. While you can add new system environment variables (only if missing, see the FAQs at bottom). Do not edit or delete the existing ones as that may harm your device.
List Environment Variables What Are Environment Variables

1. %AppData% and %LocalAppData%

%AppData% points toward the AppData Roaming folder which is connected to your Windows user profile. Roaming means that your user login information can be transferred from one Windows device to another. In contrast, %LocalAppData% opens local user profile folders created on a Windows PC.


List Environment Variables Appdata Windows11

2. %CD%

CD (change directory) is a common text string used to switch directory paths in Windows Command prompt and PowerShell. Thus, the %CD%variable tells you the precise execution directory in which you are running your code.


  • After scrolling down through several lines of text in Command Prompt, it’s easy to forget which is the current working directory. Typing echo %CD% gives you the exact one.
  • If running multiple Command prompts at once, %CD% saves you the trouble of identifying the correct working directory.
List Environment Variables Cd Command Windows11

3. %CommonProgramFiles%

The %CommonProgramFiles% variable refers to a Windows directory named “Common Files.” It contains many types of 64-bit files and folders shared among various apps. Another related variable, %CommonProgramFiles(x86)%, does the exact same job but for x86-based (32-bit) programs and utilities only.


  • The variable opens a sub-directory where you can view all the files shared by separately installed programs.
  • For any program, you can access common components present in both 64-bit or 32-bit folders. These include frameworks, Services, and DLL files.
List Environment Variables Common Program Files Windows11


%COMSPEC% or %ComSpec% is a short-cut text entry used in Run menu to open the Command Prompt. It uniquely displays the entire Command Line path “C:WindowsSystem32Cmd.exe” on the window title.


  • Engage with the Command Line directly from any location on your PC.
  • If you’re running a computer with no hard disk, you can boot the device by launching CMD along with a configured RAM disk and USB drive.
List Environment Variables Comspec Windows11

5. %Date% or %Time%

As name suggests, the environment variables %Date% and %Time% are used to display the current date and time on your device. A correct output will confirm that the latest date and time settings are in effect.


  • This variable is used to verify whether the current system date and time are correct.
  • Changing the current date and time according to “mm-dd-yy” and “0:hh:mm:ss” 24-hour format.
List Environment Variables Date Time Windows11

6. %DriverData%

%DriverData% is a variable that refers to the DriverData folder on your Windows PC. It is located at “C:WindowsSystem32Drivers.” This is a central folder containing all your driver information.


  • As the folder is accessible to “System Restore”, SFC, and other internal processes, its variable is very handy to look out for possible errors.
  • While installing any new hardware, use the variable to check if the DriverData folder hasn’t been affected.
List Environment Variables Driverdata Windows11

7. %HomeDrive%

The all-important C: drive is crucial to everything you do on your system. A command like %HomeDrive% (or %SystemDrive%) helps you open and view the location for further activity.


  • Access C: drive from anywhere on your PC.
  • Link with other environment variables such as %CD% or %CommonProgramFiles%.
List Environment Variables Homedrive Windows11

8. %LogOnServer%

Every computer is connected to a a domain group or network of devices. %LogOnServer% displays the current Windows Logon server which can be as simple as your computer name (below) or a corporate domain.


  • Quickly find out the Windows Logon server to which you’re authenticated.
  • Validate your user login to the correct Microsoft account.
List Environment Variables Logonserver Windows11

9. %Number_Of_Processors%

As name suggests, %Number_Of_Processors% gives out the number of cores on your Windows CPU. The command returns a simple numeric value referring to the number of processor cores your device has.


  • Whether your PC has dual (2), quad (4) or octa-core (8) processor configuration, using echo %Number_Of_Processors% is the fastest way to find out.
  • This is very useful when you want to run certain games and applications for which you want to know whether your device will support them.
List Environment Variables Number Of Processors Windows11

10. %OneDrive%

The OneDrive folder contains all its essential applications such as the Desktop, documents, and any files and folders synced with Microsoft’s Cloud servers. To open this folder, you can use its namesake environment variable, %OneDrive%.


  • Quickly access your Microsoft Cloud data from any location on your PC.
  • When using OneDrive folder with Command line, this variable will open the entire network path.
List Environment Variables Onedrive Folder Windows11

11. %OS%

Windows has been running its proprietary Windows NT operating system since 1993. Running an operating system-specific command like echo %OS% gives you a quick glimpse into your current operating system.


  • If you want to ensure that your current version of Windows is a valid copy (and not a pirated one,) this variable gives you the confirmation.
List Environment Variables Os Winnt Windows11

12. %Path%

%Path% is one of the most common environment variables to be used on your Windows 10/11 device. When you run an echo %Path%, it gives you all the important Path files available in your PC.


  • View all your Windows Path files in one place. This includes the routine “C:WindowsSystem32” and other file locations for PowerShell. WindowsApps and OpenSSH.
  • You can utilize these Path file locations with other commands.
List Environment Variables Path Windows11 1

13. %PathExt%

While installing native and third-party apps in Windows, you come across many files with extensions such as .COM, .EXE, .BAT (Batch files), .VBS, .VBE, and so forth. %PathExt% lets you know all the file extension types that you need to watch out for in the %Path% variable.


  • Know all the file extensions that can be executed from Command Prompt.
  • Start a program or script in Command line without specifying the suffix such as .EXE.
List Environment Variables Pathext Command Windows11 1

14. %Processor_Architecture%

So what kind of microprocessor does your Windows device contain? With a variable echo %Processor_Architecture%, you can easily tell whether you’re using Intel or AMD (or any other CPU), and whether it’s 64 or 32-bit.


  • Knowing the exact architecture your Windows device uses is helpful in installing compatible games and applications.
List Environment Variables Processor Architecture Windows11

15. %Processor_Identifier%

The echo %Processor_Identifier% variable goes deeper into CPU-specific information including processor family and model series, whether it’s Genuine Intel or AMD, and what level of design change a processor was built into (it’s called processor “stepping”.)


  • Advanced applications such as creating Windows batch scripts on testing hardware failure.
  • Testing the hardware compatibility of external components such as motherboard, RAM etc. with your Windows device.
List Environment Variables Processor Identifier Windows11

16. %Processor_Level%

In analyzing chip architecture, echo %Processor_Level% displays the processor level indicating the model number of the CPU installed in your device. It is expressed numerically as 3,4, 5 (for x86) to 6 for (x64) computers.


  • Validating that you have the right processor capabilities on your processor as advertised by chip-maker.
List Environment Variables Processor Level Windows11

17. %Processor_Revision%

Every processor while being designed goes through a series of design iterations. So echo %Processor_Revision% tells you the exact revision number of the installed CPU. In other words, it lets you know how advanced a processor is.


  • When buying a new laptop, you can use this variable to make an informed decision for a better designed chipset.
List Environment Variables Processor Revision Windows11

18. %ProgramData%

Much like Program Files, the Program Data folder is used by Windows to install standard applications, but does not require higher level Administrator privileges. Using %ProgramData% gives you easy access to this folder.


  • Malware authors often try to attack the ProgramData folder as tampering with its files can affect installed apps. Keeping it always hidden is important.
  • As an Admin user, you should stay on top of any changes in the folder. Use “System Restore” if you notice any errors.
List Environment Variables Programdata Windows11

19. %ProgramFiles%

The %ProgramFiles% and %ProgramFiles(86)% variables directly launch the respective Program Files and Program Files for 32-bit applications folders. This would allow you to view all your installed file components.


  • Add, edit and delete any program files directly in this section.
  • Are you unable to access the File Explorer for any reason? In such a case, %ProgramFiles% from the Run menu gives you quick access to this folder.
List Environment Variables Program Files Windows11

20. %Prompt%

The Prompt variable, %Prompt%, gives an indication of the current Command Prompt, validating whether or not your Command Prompt executable, cmd.exe is present in the correct folder path. It is written as echo %Prompt% and returns specific values as shown below.


  • The output Prompt text can be returned. It consist of various characters, where $P refers to a current drive and path, and $G means equal to or greater than.Thus if you get an output such as $P$G it means your cmd.exe lies in the right folder.
List Environment Variables Prompt Command Windows11

21. %PSModulePath%

The Windows PowerShell script uses various modules located in different parts of Windows PC. The variable %PSModulePath% used as echo %PSModulePath% displays all the various locations for it such as Program Files or System32.


  • PowerShell modules contain various components such as Cmdlets, Providers, workflows, and aliases. These are frequently used in coding activity in sync with the main PowerShell window.
  • With a %PSModulePath% variable, you can access them centrally without having to search for them individually.
List Environment Variables Psmodulepath Windows11

22. %Public%

The variable %Public% when typed in Run menu reveals the public users folder located at C:UsersPublic. It stores all the documents, downloads, music, and pictures attached to the publicly accessible folder.


  • Getting a bird’s eye view of all user accounts registered in a Windows device.
  • Sharing data with others using your computer or on a network.
List Environment Variables Public Command Windows11

23. %Random%

The Command Prompt has its own variable, %Random% which is used to generate a random number between 0 to 32767. To use it, you need to type echo %Random% which will lead to an output number, such as 21907 shown here.


  • Random numbers are often used in Windows batch scripts for testing purposes.
  • If you are facing issues with numeric display on your device, test if the random numbers are displaying correctly in Command line.
List Environment Variables Randomnumber Windows11

24. %SessionName%

If you are frequently using remote desktops, it may become hard to tell whether the current session hosted on a machine is local to the device. This problem can be addressed using echo %SessionName%.


  • If the SessionName is shown as “Console” then you clearly know that the session is local to your device.
  • In the same way if you see an Output such as “RDP-Tcp#”, it will inform you whether you’re using a Remote Desktop session.
List Environment Variables Sessionname Windows11

25. %SystemRoot%

The System Root of your folder, C:Windows contains many utilities that are integral to your device performance. They can all be centrally accessed from %SystemRoot% variable in Run menu. Also check %WinDir% below.


  • Accessing Control Panel applications as they’re directly linked to System Root folder.
  • The System Root contains utilities such as “Fonts.” You can directly open these folder paths from Run menu and operate on them using Command Prompt.
List Environment Variables Systemroot Windows11

26. %Temp%

One of the best known applications of environment variables, the temporary files folders can be accessed using %Temp% or %Tmp% in Run menu.


  • Instead of remembering the entire path “C:UsersAppDataLocalTemp”, you can simply open the temporary files folder with a simple and easy to remember command.
  • Delete as many temporary files as you want to free space on your device, and improve PC performance.
List Environment Variables Temp Folder Windows11

27. %UserDomain%

Every desktop device is marked by a user domain. To know where your current user is being hosted, you can check the domain with an environment variable called %UserDomain%. It has to run with an echo command as echo %UserDomain%.


  • Mapping the current PC user’s desktop session with the username in which it exists.
  • Setting up Group user policies for several users.
List Environment Variables Userdomain Windows11

28. %UserProfile%

If there are multiple usernames registered on a Windows device, it becomes difficult to tell which user is connected to a current desktop profile. Using a Run menu variable such as %UserProfile% will get you a complete view.


  • Accessing and managing multiple user profiles registered on a Windows PC.
  • Deleting and editing the desktop, documents, and downloads for multiple user profiles (something only Admin users can do).
List Environment Variables Userprofiles Windows11

29. %WinDir%

The %WinDir% is similar to %SystemRoot% in that both point to the C:Windows location on your PC. However unlike the latter, WinDir can be used to launch standard Windows system calls to open a folder or get a specific output. It is also more commonly used in latest Windows devices.


  • Centrally access error reports pertaining to system faults, as all of them link to %WinDir% variable, and its location C:Windows.
  • WinDir folder is closely linked to the administrator account and 64-bit applications.
List Environment Variables Windir Windows11


Sysman means System Resource Management library. This covers many things in Windows 11/10 such as Power Management of various system components. To enable this setting, you need to input echo %ZES_ENABLE_SYSMAN%.


  • If the Output value returns itself as 1, then it means that the default SysMan settings for CPU have been initialized.
  • On some Windows devices, you can use echo %ZES_ENABLE_SYSMAN_LOW_POWER% to ensure low power settings. Thus both these Sysman commands can be used to turn the current low power settings On or Off.
List Environment Variables Zes Enable Sysman Windows11

Frequently Asked Questions

How to resolve Windows environment variables not recognized?

If one or more of your Windows environment variables are not being recognized, it is possible that there settings are missing in your device. Go to “View Advanced System Settings” from search menu and open Environment Variables. Then add those missing environment variables one by one. Close the window and try resolving the issue.

How to export and import environment variables in Windows?

To export or import environment variables in Windows, you need to open the Registry Editor from Run menu (regedit.exe). You will find environment variables here under “HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlSession ManagerEnvironment” and “HKEY_CURRENT_USEREnvironment.” You can export and import the new environment variables in this section’s right panel.

How do I refresh environment variables in Windows?

In the Command Prompt window, using the “cls” command will clear the screen and refresh all the environment variables for you. But to do that properly, you need to first set the variables right at their respective locations. We have a detailed guide on how to set variables correctly.

Image credit: Pixabay All screenshots by Sayak Boral

Is this article useful?

Subscribe to our newsletter!

Our latest tutorials delivered straight to your inbox

Leave a Reply

Your email address will not be published.