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. 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. In this article, we will see how to view environment variables defined in Windows 10 and their values for the current user and the system variables.
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.
How to view user and system environment variables and their values
The most simple way to view the current user variables is to use the System Properties.
- Open the Control Panel.
- Navigate to the following applet:
Control Panel\System and Security\System
- Click the "Advanced System Settings" link on the left. In the next dialog, you will see the Environment Variables... button in the bottom of the Advanced tab.
- The Environment Variables window will appear on the screen.
In the upper table, you will see user variables, and the bottom list contains system-wide variables.
Here you can view their names and values or even create your own variables, or edit the value of some variable if required.
There are several other ways to see environment variables.
You can see them at the appropriate registry keys.
- Open Registry Editor.
- To see user variables, go to the following key:
Tip: How to jump to the desired registry key with one click.
- To see system variables, navigate to the following key:
Alternatively, you can view environment variables via the command prompt. Open the command prompt window, and type the following command and then press Enter:
The set command will print all available environment variables with their values, directly into the console output, so you will able to see them all at once.
If you want to see the value of a specific variable, then use the echo command instead of set, as follows:
The command above will print the path to your account profile.
Replace userprofile with the desired name of the variable. For example, echo %computername%. That's it.
That's it. Now you know all the useful ways to see the names and values of variables defined in your Windows environment.
Winaero greatly relies on your support. You can help the site keep bringing you interesting and useful content and software by using these options:
5 thoughts on “How to see names and values of environment variables in Windows 10”
thanks for great tips as always.
but just a question about Sticky Notes, as you know the Sticky Notes has been into metro style app after win10 anniversary update instead of common “desktop” app. is there any way to get the Sticky Notes back like you did with old calc/photo viewer?
thanks in advance
Well, it is possible. I need some time to prepare the package.
You also have the option of restoring the Sidebar Gadgets and then using the Vista Sticky Notes gadget. It does not even create a Taskbar button for every note saving precious taskbar space. By pressing Win+G you can access all your notes.
My favorite: snippet to parse %path%:
for %G in (“%path:;=” “%”) do @echo %G
A very convenient tool for showing and modifying the envrionment variables ist Varpanel: