How to add a enviroment variable without GUI

0

Is there a way how I can add a new environment variable specifically PATH without going into control panel etc.

Is there a file I can edit for this or a command line argument that can do the same thing?

Dev_anon101

Posted 2016-01-05T20:45:56.440

Reputation: 147

Question was closed 2016-01-05T20:52:29.513

Use set or setx. See the duplicate question link as well as set and setx.

– DavidPostill – 2016-01-05T20:48:48.930

Answers

0

You can actually define one by issuing set your_var=some_value in a cmd window. If you want to get the value you have to issue %your_var%.

The same works with modifying environment variables like path. To expand it you can for example do something like this set path=%path%;some_dir.

But keep in mind that such modifications just stay for your current cmd session/window.

Bastian

Posted 2016-01-05T20:45:56.440

Reputation: 101