Easier way to change environment variables in Windows 8? [duplicate]

Solution 1:

Have you explored the set and setx command? With them you can set a persistent variable. Moreover, the value will be applied immediately, not after the next logon.

Example of windows SET command:

Print the PATH environment variable:

C:\Users\Charity>echo %PATH%
C:\windows\system32;C:\windows and space;C:\foobar

Use set command to set the PATH variable

C:\Users\Charity>set PATH=%PATH%;C:\epicpath
C:\Users\Charity>

The above command only applies to the current window and the change is lost when the cmd window is closed.

C:\Users\Charity>echo %PATH%
C:\windows\system32;C:\windows and space;C:\foobar;C:\epicpath

Example of windows SETX command:

Print the PATH environment variable:

C:\Users\Charity>echo %PATH%
C:\windows\system32;C:\windows and space;C:\foobar

Use setx to set the environment variable:

C:\Users\Charity>setx PATH "%PATH%;C:\zombiepoke"
SUCCESS: Specified value was saved.

Close and re-open cmd terminal, then run:

C:\Users\Charity>echo %PATH%
C:\windows\system32;C:\windows and space;C:\foobar;C:\zombiepoke

You have to be careful with double quotes. If you let quotes get into your path variable it might break something. However they are necessary for specifying addendums to the original %PATH%.

Solution 2:

Set Environment variable in Windows 8.

You can access the advanced system setting by right clicking Computer in a file-explorer and going to properties.

This is same as older versions of windows. You can also set environment variables from command line as given here :

What are PATH and other environment variables, and how can I set or use them?