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. Recently I covered how to view those variables for system, for a specific user or for a process. In this article, I would like to share with you a trick to view or edit environment variables directly, from the command line or a shortcut.
Note: Starting in Windows 10 Build 10547, there is a new environment variables editor. Instead of the compact text box, now it shows each value on its own line in a table form! This makes editing the value easier and the user is less likely to make errors.
To open environment variables settings directly, you can to use a special RUNDLL32 command:
Type it in the Run dialog (Win + R), press the Enter key, and it will run the Environment Variables window immediately.
You can create a shortcut to this command to pin it on the Start menu or to the taskbar or even assign a global hotkey to that shortcut. Here is how it can be done.
Create Environment Variables Shortcut in Windows 10
- Right click the empty space on your Desktop. Select New - Shortcut from the context menu (see the screenshot).
- In the shortcut target box, type or copy-paste the following:
- Use the line "Environment Variables" without quotes as the name of the shortcut. Actually, you can use any name you want. Click on the Finish button when done.
- Now, right click the shortcut you created and select Properties.
- On the Shortcut tab, you can specify a new icon if you wish. You can use the icon from the c:\windows\system32\sysdm.cpl file.
- Click OK to apply the icon, then click OK to close the shortcut properties dialog window.
Now, you can move this shortcut to any convenient location, pin it to taskbar or to Start, add to All apps or add to Quick Launch (see how to enable Quick Launch). You can also assign a global hotkey to your shortcut.
Winaero greatly relies on your support. You can help the site keep bringing you interesting and useful content and software by using these options: