How to Set Environment Variables in Windows 10

Windows 10 supports a number of legacy features from older versions of the operating system. One of those legacy features is the environment variable. Environment variables offer a useful way to control the way Windows operates with an extremely small footprint in terms of memory usage.

How to Set Environment Variables in Windows 10

For example, one common environment variable is called PATH, which is simply an ordered text string containing a list of directories that Windows should look in when an executable file is called. The PATH environment variable allows users to quickly launch programs without having to know where those programs live on the hard drive.

Setting environment variables is very useful and, fortunately, very simple. In this article, we’ll go over how to find and set your environment variables in Windows 10.

How Do I Set Environment Variables in Windows 10?

  1. Once logged in to Windows, right-click the Windows button in the lower-left corner of your screen and click System from the Power User Task Menu that’s displayed on the screen. Windows Taskbar menu
  2. Under the System menu, you need to click the Advanced System Settings. System Menu
    • If you can’t find Advanced System Settings there, type “advanced system settings” into the search box and hit return to bring it up.
  3. Once Advanced System Settings is open, click on the Advanced tab, then look on the bottom-right side for the Environment Variables. System Properties
  4. Next, to create a new environment variable, click New. You might need to make a System variable depending upon what you’re doing.
  5. A dialog box will pop up, allowing you to enter a new variable name and to set its initial value:
    • New adds a new environment variable.
    • Edit lets you edit whatever environment variable you have selected.
    • Delete lets you delete the selected environment variable.
  6. Save any changes that you make by clicking OK.

How to Find the PATH Variable in Windows 10

  1. Under the Environment Variables window, choose or highlight the PATH variable in the System Variables section shown in the window.
  2. After highlighting the PATH variable from System Variables, click the Edit button.
  3. You can add or modify the path lines with the directories you want your computer to look in for executable files.
    • You will find that each different directory is separated with a semicolon, for example: C:Program Files;C:Winnt;C:WinntSystem32
  4. There are other environment variables in the System Variables section that you can examine by clicking Edit.
  5. Likewise, there are different environment variables, such as PATH, HOME, USER PROFILE, HOME and APP DATA, TERM, PS1, MAIL, TEMP, and so on. These Windows environment variables are very useful and can be used in scripts as well as on the command line.
  6. Once finished, you can test your changes by opening a new PowerShell window and entering the following: $env:PATH

Frequently Asked Questions

Here is some more information about Environment Variables for you:

How Do I Find Environment Variables in Windows 10?

To find environment variables in Windows 10, you can follow the steps described above to find the environment variable information tucked away inside the system’s advanced settings.

Alternatively, if you just need to see what the variables are but don’t need to change them, you can simply open a command-line interface by hitting Ctrl +Esc and typing “cmd” in the command box, then type “set” in the command window. This prints out all the environment variables that are set on your system.

Why Can’t I Edit the Environment Variables?

There are several reasons that you may not be able to set these variables.

1. The first of your problems could be that you don’t have Admin rights. To set or edit this function, you must be the Administrator of the system.

2. If you are the Admin, yet the edit function is greyed out, try accessing the Environment Variables by accessing the Control Panel from the Start menu. Click on Advanced System Settings, then click Environment Variables.

Final Thoughts

Windows 10 environment variables make it incredibly easy to take control of your Windows device and make it run more efficiently. To find and set environment variables in Windows 10, follow the simple steps laid out in this article to get started.

Disclaimer: Some pages on this site may include an affiliate link. This does not effect our editorial in any way.