Windows – How to set system environment variables in Windows 10?

windowswindows 10

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.)

Best Answer

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

Related Question