MSFTNEXT

How To Find All Environment Variables in Windows 10

Environment variables in an operating system are values that contain information about the system environment, and the currently logged in user. They existed in OSes before Windows as well, such as MS-DOS. Environment Variables are a set of dynamic named values that can affect the way running processes will behave on a computer. For example, a running process can query the value of the TEMP environment variable to discover a suitable place to store temporary files, or the AppData variable to find a quick way to get access to the Roaming folder in the user’s profile folder.

Applications or services can use the information defined by environment variables to determine various things about the OS, for example, to detect the number of processes, the currently logged in user’s name, the folder path to the current user’s profile or the temporary files directory.

Windows 10 has several types of environment variables: user variables, system variables, process variables and volatile variables. User environment variables are accessible to all apps which run in the current user context, system environment variables apply to all users and processes on the PC; process variables are applicable only to a specific process and volatile variables are those which exist only for the current logon session. Most interesting of these are user, system and process variables, as we can modify them.

In Windows, there are a few ways to discover how many of them are available and what their values are. The most simple way to view the current user variables is to use the System Properties.

To Find All Environment Variables in Windows 10

  1. Open the Control Panel.
  2. Navigate to the following path: Control Panel\System and Security\System.
  3. Click the “Advanced System Settings” link on the left.
  4. In the next dialog, you will see the Environment Variables… button in the bottom of the Advanced tab.
  5. The Environment Variables window will appear on the screen.
  6. You are done.

In the upper table, you will see user variables, and the bottom list contains system-wide variables.

Also, here you can view their names and values or even create your own variables, or edit the value of some variable if required.

Unfortunately, this lists most of the available variables but not all. Also, the System Properties window is hidden in Windows 10 version 20H2, and is completely removed in builds released after it. Here are some alternatives.

Find Windows 10 Environment Variables in Registry

  1. Open Registry Editor.
  2. To see user variables, go to the following key: HKEY_CURRENT_USER\Environment.
  3. To see system variables, navigate to the following key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment.
  4. You are done.

It’s quite tedious going through multiple steps to get your environment variable information. Here is a better way.

Find Windows 10 Environment Variables in Command Prompt

  1. Open a new command prompt window.
  2. Simply type the following command and then press Enter: set.
  3. The set command will print all available environment variables, so you will have a complete list of Environment Variables and their values.
  4. You are done.

Bonus tip

If you want to see the value of a specific variable, then use the echo command instead of set, as follows:
echo %userprofile%
The command above will print the path to your account profile.

Replace userprofile with the desired name of the variable. For example, echo %computername%.

Find Windows 10 Environment Variables in PowerShell

  1. Open PowerShell.
  2. To find and list all Environment Variables at once, typedir env:
  3. The cmdlet will show you all available Environment variables.
  4. You are done.
Looks like you've read the post to the end. If you enjoyed it, please share it. You would greatly help our blog to grow!
Exit mobile version