The Categorizer

the categorizer logo

How To Check Environment Variables in Windows (6 Ways)


Environment variables in Windows are used to store information that are used by applications and services. The Windows operating system defines a number of environment variables, and user applications and services can also further add additional environment variables.

When you start a Windows program, the operating system creates several environment variables that the program can use. These variables include the path to the application’s directory and any additional folders that the program requires access to.

It seems that you want to check compatibility issues among the numerous environment variables stored on your computer. By the end of this article, you’ll be able to list all environment variables in Windows:


Step 1: In the Start menu, search for “Edit the system environment variables” (without quotation marks) and hit the enter key.

type "edit the system environment variables" in start menu
Edit System Environment Variables

Step 2: In the “Advanced” tab, click the “Environment Variables” button and all the environment variables on your system will be visible..

click the environment variables button in the advanced tab in advanced system properties
“Environment Variables” Button
list all environment variables using system properties
List of All Environment variables – Both User and System Environment Variables

Step 1: Run the Command Prompt as an administrator from the Start menu.

command prompt icon in windows 11
Command Prompt (CMD) Icon

Step 2: To list all the environment variables using Command Prompt, type the command “set” (without quotation marks).

command to list environment variables in windows using command prompt (CMD)
Command To List Environment Variables using CMD

Step 1: Run the PowerShell as an administrator from the Start menu.

powershell app icon in windows 11
PowerShell App Icon

Step 2: To list all the environment variables using PowerShell, type the command: “gci env:” (without quotation marks).

command to list environment variables in windows using PowerShell
Command To List Environment Variables using PowerShell

Step 1: Right-click the desktop and add a new “Text Document”.

right click mouse button and create a new text document file
Create New Document

Step 2: Copy and Paste the following script in the text document:

@ECHO OFF
set
pause

batch script to show environment variables in windows
Batch Script To Show Environment Variables In Windows

Step 3: Click the “File” button on the top left corner of the window and click the “Save As” option.

click the file button on top bar and click the save as button to save the script
“File” Button > “Save as” Button

Step 4: Change the file extension to “File-Name.bat’ (.bat is the new extension), choose the desired location where you want to save the file and click the “Save” button.

save the text document from txt extension to bat extension to save the batch script to show environment variables in windows
File Extension from “.txt” to “.bat”

Step 5: Once the file is saved, double-click it to execute and you’ll see the environment variables listed in command prompt.

running batch script to show environment variables in windows
Running Batch Script To Show Environment Variables

NOTE: If copying and pasting the script above doesn’t work, type the script in the text document instead.


Step 1: In the Start menu, search for System Information and open it or press the “Windows Logo Key + R” key combination to open Windows Run, type “msinfo32” (without quotation marks) and hit the enter key.

system information app icon in windows
System Configuration Icon

Step 2: In the left sidebar, expand the “Software Environment” section by clicking the “+” icon, click the environment variables button and you’ll see the environment variables listed on the right pane.

click the plus button to expand the software tab and click the environment variables button
“+” Button > “Environment Variables” Button

1. Check System Environment Variables using Registry Editor

Step 1: In the Start menu, search for Registry Editor and hit the enter key or press the “Windows Logo Key + R” key combination on the keyboard, type: regedit and hit the enter key.

Step 2: To Check System Variables, navigate to the following path: Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment and you’ll find the system variables listed on the right pane.

check system environment variables in windows using registry editor
System Environment Variables in Registry Editor

2. Check Environment Variables for Current User using Registry Editor

Step 1: In the Start menu, search for Registry Editor and hit the enter key or press the “Windows Logo Key + R” key combination on the keyboard, type: regedit and hit the enter key.

Step 2: To check user variables, navigate to the following path: Computer\HKEY_CURRENT_USER\Environment and you’ll find the user variables listed on the right pane.

check user environment variables in windows using registry editor
User Environment Variables in Registry Editor

How does environment variables work in Windows?

Environment variables are the dynamic objects in form of key/value pairs that are responsible for instructing the programs to search for user profile settings, install files, and store temporary files in appropriate location in Windows.

What are types of environmental variables?

There are two types of environment variables: User environment variables and system environment variables. The system variables are shared and applied to all users on the computer, but the user variables are exclusive to each profile.

Where are environment variables stored in Windows?

In Windows, the user environment variables are stored in HKEY_CURRENT_USER\Environment in the registry editor and the system variables are stored in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment in the registry editor.


Next Steps

We’ve covered how to check environment variables in Windows 11. To list environment variables in Windows, you can use any one of the methods listed above.

Further, configure the environment variables and other settings by referring the related articles below.


how to set path and system variables in windows

How To Set Path and Environment Variables in Windows

Learn How To Set Path Environment Variable in Windows manually.

how to refresh environment variables in windows

How To Refresh Environment Variables in Windows

Refresh the environment variables without restarting your computer after adding new variables.

how to enable transparent background in windows terminal

How To Make Windows Terminal Transparent

Increase or Decrease Windows Terminal Transparency in Windows based on your needs.

how to hide taskbar automatically in windows 11

Hide Taskbar Automatically in Windows

Increase your display size slightly by some pixels by auto hiding taskbar when it’s not in use.

Take a Minute to Share This Article.