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.

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?

Once logged in to Windows, right-click the Windows button in the lower-left corner of your screen. This will open up the Power User Tasks Menu.

Depending on your settings, this process may open the Start menu instead. If it opens the Start menu, type “Windows-x on your keyboard to open the Power User Task Menu.

set-environment-variables-in-windows10

Click System from the Power User Task Menu that’s displayed on the screen.

set-environment-variables-in-windows10

Under the System menu, you need to click the Advanced System Settings.

If you can’t find Advanced System Settings there, type “advanced system settings” into the search box and hit return to bring it up.

set-environment-variables-in-windows10

Once Advanced System Settings is open, click on the Advanced tab, then look on the bottom-right side for the Environment Variables.

set-environment-variables-in-windows10

Next, to create a new environment variable, click New.

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.

Save any changes that you make by clicking OK.

How to Find the PATH Variable

Under the Environment Variables window, choose or highlight the PATH variable in the System Variables section shown in the window.

set-environment-variables-in-windows10

After highlighting the PATH variable from System Variables, click the Edit button.

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:\Winnt\System32

There are other environment variables in the System Variables section that you can examine by clicking Edit.

Likewise, there are different environment variables, such as PATH, HOME and 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.

Speaking of the command line, 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. 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.

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.

3 thoughts on “How to Set Environment Variables in Windows 10”

Avatar David W says:
1) How is the Environment variable being used by the OS to make its linkage to whatever?
2) If I create my own Environment variable does the OS know what to do with it – or — how do I use it and for what purpose?
Avatar Ray says:
How do I get the path file back if it was deleted?
Avatar sai says:
I cannot create new system variables as all buttons are disabled. How to acheive this please help.

Leave a Reply

Your email address will not be published. Required fields are marked *


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

Todays Highlights