Environment variables in an operating system are values that contain information about the system environment, and the currently logged in user. Recently we 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.
To open environment variables settings directly, it is possible to use a special RUNDLL32 command, as described below.
- Press Win + R shortcut keys together on your keyboard. This will open the Run dialog.
Tip: See the ultimate list of all Windows keyboard shortcuts with Win keys.
- Type the following command in the Run box:
Note that by default the Environment Variables editor window will allow you to edit only current user variables. All system-related buttons will be disabled.
To edit the system variables, you have to run this command as administrator, for example, via an elevated command prompt instance.
After that, all options in the Environment Variables window will be accessible.