How do I set system environment variables in Windows 10? [duplicate]
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.)
Solution 1:
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.
Then on the left side click About and select System info at the bottom.
In the new Control Panel window that opens, click Advanced system settings on the left.
Now in the new window that comes up, select Environment Variables... at the bottom.
Solution 2:
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(!).