-1

I messed up with the Environmental variables to set up a permanent path in the command prompt. I want to set up a different permanently in command prompt.

Can I get come help with correcting my path Environmental Variables and have a permanent different path set up in command prompt.

Thank you

https://i.stack.imgur.com/nARSt.jpg

happyme
  • 233
  • 2
  • 5
  • 16
  • Please note also that the linked question was the **top result** of my googling for `start cmd in different directory`, so you might want to consider improving your Internet searching skills too. – Andriy M May 23 '14 at 07:44

2 Answers2

1

I am assuming you are using Windows as your OS as you say "command prompt".

Suppose you want to correct PATH environment variable, you can use the following commands to your aid:

To display what is in PATH,

echo %PATH%

To set it to a different value,

PATH=<<drive:your/path/here/>>

To add to the PATH,

PATH=%PATH%;<<drive:your/path/here/>>

Alternatively, you can also set it using GUI:

  1. Right click on "My Computer" and select "properties"
  2. Click on Advanced System Settings
  3. In Advanced tab, click on "Environment Variables"
  4. Edit the variables as you see fit.
Stephan
  • 53,940
  • 10
  • 58
  • 91
toddlermenot
  • 1,588
  • 2
  • 17
  • 33
  • Thank you, Let me give this a try. I tried set path before, it did not work – happyme May 20 '14 at 17:52
  • Welcome. Note that the that tags along with its contents are for your understanding only. You would not want the tags in your actual command. – toddlermenot May 20 '14 at 17:57
  • Thank you for helping me. Actually, I have to enter into the folder I want again after I close the command prompt. – happyme May 21 '14 at 16:35
1

if you want to set up path that will not exist after closing cmd Use

set PATH=%PATH%;<<drive:your/path/here/>>

if you want to set up path that will exist after closing cmd use

setx PATH %PATH%";<<drive:your/path/here/>>"
Masum Nishat
  • 358
  • 1
  • 15
  • I could set the path, but setx is not recognized as any command in the command prompt. So, after closing the cmd, I have to start all over again. – happyme May 21 '14 at 16:34
  • maybe some system variable is missing from your system . Please check whether system32 folder is available in your path variable or not – Masum Nishat May 21 '14 at 17:12
  • Your `setx` syntax is incorrect. It should be `setx variablename "value"`, i.e. no `=` and the value must be enclosed in double quotation marks. – Andriy M May 23 '14 at 07:34