This question already has an answer here:

How do I set a system environment variable in Windows 10 (without using the registry editor)?

(Note: Other answers don't specifically address Windows 10 - at least not yet - and they leave off important steps - like how to open the control panel - that changed since previous versions of Windows.)

marked as duplicate by DavidPostill windows Mar 13 '16 at 14:55

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 12
    Is that supposed to be a cruel riddle? :) – Jared Aug 2 '15 at 19:48
  • 2
    This last time this was asked, this happened: superuser.com/questions/601526/… so you should look at this: superuser.com/questions/284342/… – MC10 Aug 2 '15 at 19:50
  • 2
    Control Panel → System and Security → System → Advanced system settings → Environment variables. This is the same way I did it in Windows 7, it is the same in Windows 10. All we ask is that our users do a little research or digging around before asking similar questions. – MC10 Aug 2 '15 at 19:59
  • 2
    See...if you had put that in an answer, I could have upvoted and accepted, granting you some rep. :) (That said, getting in to the Control Panel on Windows 10 is also completely not obvious if you're coming from previous versions). – Jared Aug 2 '15 at 20:03
  • 1
    @MC10: There's no "Advanced system settings" under "System". You skipped "About → System Info" between these two. Sooo intuitive location! Who'd think changing environment variables could be anywhere else than under "About/System Info"... – SF. Nov 9 '15 at 11:47
up vote 129 down vote accepted

Update: After seeing lots of comments about setting environment variables without admin in Windows 10, I think I have found a way. I was not admin and could use PowerShell.

PowerShell method

You can list all environment variables with: Get-ChildItem Env:.

To get the value of a specific variable: $Env:PATH, where PATH is the name of the variable.

To set a variable: [Environment]::SetEnvironmentVariable("PATH", "C:\TestPath", "User"), the first parameter is the name of the variable, the second is the value, the third is the level of.

There are different ways to work with environment variables and certain quirks with them in PowerShell so consult the link for details.

Old method (no longer available in newer Windows 10 updates, use PowerShell or see other answers)

Go into Settings and click on System.

System

Then on the left side click About and select System info at the bottom.

About

In the new Control Panel window that opens, click Advanced system settings on the left.

Advanced system settings

Now in the new window that comes up, select Environment Variables... at the bottom.

Environment Variables

  • 11
    That doesn't work if you aren't administrator. – Ira Baxter Jul 16 '16 at 23:27
  • 2
    There is a direct path in a more recent Windows 10: in the main Settings window, just type "Path" into the search box and options to jump straight to the variable editors will appear. Saves a few steps of clicking. – jakobengblom2 Oct 26 '17 at 18:48
  • Updated answer with a PowerShell method which should work when not an admin. I'm not 100% sure on the admin part as I am on a company laptop, and I am usually prompted for admin actions and but I was not for PowerShell and this worked. – MC10 Oct 26 '17 at 19:12
  • 2
    After the new Windows update, System info is missing from the About section – Iter Ator Dec 1 '17 at 18:51
  • How to activate this? I can logout, is there a better way in the terminal? – Sören Feb 7 at 14:42

Still the same as ever: It’s in the old-style control panel’s “System” thingy. You can reach it with WinBreak or by right-clicking the Start button.

From there, select “Advanced system settings” → “Environment Variables”.

Or you can do it the hard way and find some other entry point to the old-style control panel, like the Network and Sharing Center or the Desktop folder(!).

  • 18
    This method is only applicable to accounts from Administrators group. It is not possible to change environment variables of a regular User level account using this method. – AnT Nov 18 '15 at 6:28
  • It's funny what cannot be easily found, when the little Computer icon is no longer on the desktop. – octopusgrabbus Feb 17 '17 at 14:27
  • On my system, the PATH environment variable allows editing, but PowerShell truncates the value after 2542 characters. However, it appears to retain the entire list of paths internally, so even though you can't see the entire list of paths from the prompt, it uses the entire list to find commands. – Suncat2000 Jun 15 '17 at 18:55

I typed "envir" in the "Search the web and Windows" box and selected "Edit environment variables for your account" under the "Best Match"

enter image description here

  • 1
    Unfortunately, doing this search no longer produces such search result. – AnT Nov 18 '15 at 7:57
  • 18
    It works for me – Alex Szabó Dec 15 '15 at 13:20
  • 5
    @Alex Szabó: I was wrong when I said "no longer produces such result". The serach result are indeed the same. But clicking of the first result (highlighted in your picture) in current Windows 10 does nothing for non-admin accounts. It is a "dead link". This is the same bug, introduced by 1511 update as the one described in my answer. So no, it doesn't really work in general case. – AnT Jan 15 '16 at 15:18
  • 1
    This is the correct answer for Win10. Answers from Daniel and MC10 will modify only system variables or variables for administrator account. As for the bug, I have a fresh install of Win10 with latest patches/upgrades as of this date (2016-08-06, winver 10.0.14393) and searching for "variable" in menu start produced correct 2 hits (edit-vars-for-system and edit-vars-for-this-account). "system" version requires admin rights. "account" version does not require them and works correctly. – quetzalcoatl Aug 6 '16 at 21:14
  • 4
    This is the answer. If you are using another language, you must type the equivalence in that language (in my case Chinese/Spanish). Type "variable del sistema" when you set Spanish as your preferred language, or “系统变量” when you use Chinese. It's there. You cannot miss it.BTW, it applies to all the searching work in this searching bar, and when you cannot find the Control Panel, you can type "control panel"/ "panel de control"/“控制面板” there. It's well designed. – WesternGun Apr 10 '17 at 17:49

If by "system environment variables" you refer specifically to system-wide environment variables, then other answers have already covered this. However, if you want to edit both system-wide and user-specific environment variables then most (if not all) of these answers are inapplicable in general case.

Going through "System" and then “Advanced system settings” -> “Environment Variables” will only work for accounts from Administrators group, because only such accounts have access to “Advanced system settings”.

If you attempt do that from a regular user account, then trying to access “Advanced system settings” will trigger an UAC prompt asking you for administrator password. If you enter the password, “Advanced system settings” will successfully open, but any user-specific changes you make there will apply to the corresponding administrator's account (!), not to your original user's account.

In order to solve this problem (i.e. in order to give regular users the opportunity to edit their own environment variables) Windows provides another way to access the “Environment Variables” dialog.

Open Control Panel. Open User Accounts applet. On the left-hand side of that applet you will see a link that says Change my environment variables. Click that link, and it will take you to the same “Environment Variables” dialog for your user's environment variables.

enter image description here

If your user has administrator rights, you will be able to edit both sections of that dialog: user-specific environment variables (upper section) and system-wide environment variables (lower section). If you don't have administrator rights, you will only be able to edit the upper section: your own user-specific environment variables.

This is the proper way to edit environment variables in all post-UAC versions of Windows, not what is suggested in the majority of the answers above.


Unfortunately, Windows 10 November update (version 1511) destroyed this functionality. The Change my environment variables link no longer works. It is there, but it is dead. So for the post-November version of Windows 10 the correct answer is: it is generally impossible to edit user-specific environment variables in version 1511 of Windows 10 from regular user accounts. Microsoft has destroyed Windows 10 with this update and Windows 10 is now unusable. It will remain the case until they fix these ridiculous bugs in 1511 version of the OS.

For the time being one workaround for non-administrative accounts is to, well, add your user account to Administrators group, logout, log back in, edit the variables using "System" -> “Advanced system settings” method, and then take away administrative rights again...

An alternative workaround is to use PowerShell features as described here https://technet.microsoft.com/en-us/library/ff730964.aspx


Windows 10 Anniversary Update (version 1607) released August 2, 2016 finally fixed this bug.

  • As of today, this option works again. IMO you could remove the "not working" paragraph. – Steed Apr 21 '16 at 14:31
  • @Steed: My Windows 10 Pro x64 is currently "Version 1511 Build 10586.218" and that option is still dead. What build do you have? – AnT Apr 21 '16 at 14:54
  • Oh, sorry, my version is 10.0.10240 (Win 10 Pro x64), which should be older than yours. However, it's an up-to-date stock version with no updates pending in Windows Update. Maybe your one is Insider Preview or something? – Steed Apr 21 '16 at 15:00
  • @Steed: No, mine is ordinary current public version of Windows 10 Pro. Meanwhile, your version number indicates that you are running the original Windows 10. You never installed update 1511 (aka "November update", aka "Threshold 2 update"). This is why you don't have this issue, since this issue, as I said in my answer above, was introduced by 1511 update specifically. If you update your Windows to the current version, you will observe the same problem. I don't know though why Windows Update is telling you that your version is up-to-date. – AnT Apr 21 '16 at 15:55
  • 1
    @quetzalcoatl: Anniversary Update finally fixed this issue. – AnT Aug 6 '16 at 23:03

Just hit Windows Key+R) at the same time to get command prompt. Then type sysdm.cpl, go to advanced and select Environmental Variables

enter image description here

  • 3
    This only changes environment variables for an admin. – Lawrence Dol Jul 20 '16 at 18:57
  • This is most straight forward answer which will bring you right to set up window. – jdhao Feb 7 at 13:35

I also experience the problem described by many users in this thread, i.e. the link to the dialogue to set the environment variables of non-admin users is dead. As a simple workaround I have downloaded this nice tool:

http://www.rapidee.com/en/download

It is portable and requires no permissions to install, it is simple to use, and actually provides a better overview of the variables than the system dialogue anyway.

Hope this helps.

If you are not afraid of the command line, you should check out the command setx.

I quote from its description:

Creates or modifies environment variables in the user or system environment. Can set variables based on arguments, regkeys or file input.

(Note that this command does not affect the current command shell's environment, only the environment of new processes, so you'll need to open a new command shell to see any changes.)

  • setx works, but, unfortunately, cannot delete environment variables. – AnT Jan 14 '16 at 23:28
  • True, and I don't know how to do that, other than setting the variable to an empty value, which isn't really deleting it. On the other hand, it works from a regular account (i.e.: not in the Administrators group). If I haven't missed it, none of the answers provided so far work from a non-admin account. – fogbank Jan 26 '16 at 21:18
  • PowerShell method (see link at the end of my answer) works from non-Admin account. – AnT Jan 27 '16 at 1:27
  • @Ant: Incorrect; I edited the answer with how. – Lawrence Dol Jul 20 '16 at 20:04
  • @Lawrence Dol: Er... No. Setting an env variable to blank value and deleting an env variable are two completely different things (as @fogbank already noted above). One more time: setx does not support deletion of variables. – AnT Jul 20 '16 at 21:40

I found at least one way:

In the "Search the web and Windows" box on the taskbar, type "environment variables" then select "Edit the system environment variables" then click "Environment variables"

In windows 10, changing the environment variables has not changed, It is the same as in windows 7: Right click on This PC (My Computer). Left Click Properties. Left Click Advanced system settings. Left Click Environment Variables...

At this point you can change the variables for the current user or the system

  • This is correct. "This PC" is under your File Explorer's left quick toolbar, it's not hidden, just needs patience to find it. That's why someone downvoted it and I see it not proper, thus the upvote from me. – WesternGun Apr 10 '17 at 17:54

Not the answer you're looking for? Browse other questions tagged or ask your own question.