How to Add Environment Variables Context Menu in Windows 10
Environment variables in an operating system are values that contain information about the system environment, and the currently logged in user. By adding a special context menu, you'll be able to see and change them quickly.
Advertisеment
Environment variables 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.
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.
Example: A user environment variable.
Example: A system environment variable.
Windows 10 stores user environment variables under the following Registry key: HKEY_CURRENT_USER\Environment
. System variables are stored under the following key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment
.
Here's how the context menu looks:
To Add Environment Variables Context Menu in Windows 10,
- Download the following ZIP archive: Download ZIP archive.
- Extract its contents to any folder. You can place the files directly to the Desktop.
- Unblock the files.
- Double click on the
Add Environment Variables Context Menu.reg
file to merge it. - To remove the entry from the context menu, use the provided file
Remove Environment Variables Context Menu.reg
.
You are done!
How it works
The Registry files above modify the Registry branch: HKEY_CLASSES_ROOT\DesktopBackground\Shell\EnvVars
. This means that the context menu will be available to all Windows user accounts.
Tip: See how to go to a Registry key with one click.
Both entries execute the following command: rundll32.exe sysdm.cpl,EditEnvironmentVariables
.
When started non-elevated, it opens the Environment Variables window that won't allow editing system variables. The other entry starts this command as Administrator, so you will be able to edit system variables as well.
Also, you can use that command to create an Environment Variables shortcut in Windows 10.
That's it.
- Create Environment Variable in Windows 10
- Create Environment Variables Shortcut in Windows 10
- How to see names and values of environment variables in Windows 10
- See names and values of environment variables for a process in Windows 10
- Windows 10 build 10547 features a new environment variables editor
Support us
Winaero greatly relies on your support. You can help the site keep bringing you interesting and useful content and software by using these options:
If you like this article, please share it using the buttons below. It won't take a lot from you, but it will help us grow. Thanks for your support!
Advertisеment
You can also edit this key directly with the help of you own low level C++ program, or from RegEdit GUI: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment to set PATH or any other variables you want. HKEY_CURRENT_USER has similar variable too.