Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I've recently started using Windows (having used Ubuntu up until now) and I find myself unable to properly set environment variables. Whenever I set them they don't seem to work. I've been going to Start->Edit Environment Variables for your Account and editing the PATH value in the upper half of the GUI. Here's what I've got so far.

 ;C:\Chocolatey\bin;C:\tools\mysql\current\bin;C:\Program Files (x86)\Git\bin;C:\Program Files\MySQL\MySQL Server 5.6\bin\;C:\Python33\Scripts;

These are each the parent directories of the executables I'd like to be able to run by name from CMD, but mysql, git, and pip aren't being recognized. Am I doing something wrong syntactically or at a general understanding level? I'd like to be able to run these commands without having to specify the full path to the executables every time.

EDIT: The full PATH extracted from CMD

PATH=C:\Python33\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files (x86)\AMD APP\bin\x86_64;C:\Program Files (x86)\AMD APP\bin\x86;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\GTK2-Runtime\bin;C:\Program Files\WIDCOMM\Bluetooth Software\;C:\Program Files\WIDCOMM\Bluetooth Software\syswow64;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files (x86)\QuickTime\QTSystem\;C:\Program Files (x86)\Common Files\Acronis\SnapAPI\;C:\Program Files (x86)\Java\jre7\bin;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\Program Files (x86)\Microsoft SDKs\TypeScript\;C:\Program Files (x86)\MySQL\MySQL Utilities 1.3.4\; ;C:\Chocolatey\bin;C:\tools\mysql\current\bin

I'm being forced to use Windows by my work environment, I don't enjoy the state of affairs.

share|improve this question
1  
Have you tried closing the cmd window and reopening it? –  itdoesntwork Nov 10 '13 at 0:21
1  
As an experiment, open a cmd prompt and type path=C:\Program Files (x86)\Git\bin<ENTER> now see if you can run Git without entering the full path. –  barlop Nov 10 '13 at 0:30
    
And i'd skip the user variables section and just change the system variables. see the path change as you change it in that dialog box. Hit OK in that dialog box then open a cmd prompt and type PATH<ENTER>. copy and paste the path to a txt file before you change it in that dialog box. –  barlop Nov 10 '13 at 0:34
    
also open a cmd prompt hit PATH<ENTER> and paste the whole thing into your question –  barlop Nov 10 '13 at 0:35
    
@barlop i set path=C:\Program Files (x86)\Git\bin in CMD and then git worked. Does that set it permanently? Using the GUI hasn't been working... –  avorum Nov 10 '13 at 1:50

1 Answer 1

up vote 0 down vote accepted

Here are some amendments i'd make. So try this command

set PATH=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Python33;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files (x86)\AMD APP\bin\x86_64;C:\Program Files (x86)\AMD APP\bin\x86;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files (x86)\GTK2-Runtime\bin;C:\Program Files\WIDCOMM\Bluetooth Software;C:\Program Files\WIDCOMM\Bluetooth Software\syswow64;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0;C:\Program Files\Microsoft SQL Server\110\Tools\Binn;C:\Program Files (x86)\QuickTime\QTSystem;C:\Program Files (x86)\Common Files\Acronis\SnapAPI;C:\Program Files (x86)\Java\jre7\bin;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit;C:\Program Files (x86)\Microsoft SDKs\TypeScript;C:\Program Files (x86)\MySQL\MySQL Utilities 1.3.4;C:\Chocolatey\bin;C:\tools\mysql\current\bin

I edited the path in notepad

PATH=C:\Python33\; <-- may not be wrong but i'd remove the \ so C:\Python33;

and these three should really be at the beginning
C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;

C:\Windows\System32\WindowsPowerShell\v1.0\; (may not be wrong but i'd remove the \ )

C:\Program Files\WIDCOMM\Bluetooth Software\; ditto

;C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0\; ditto

C:\Program Files\Microsoft SQL Server\110\Tools\Binn\; <-- Binn, hmm, turns out that's right Binn. Though i'd still change \; to ;

C:\Program Files (x86)\QuickTime\QTSystem\; <-- the \

C:\Program Files (x86)\Common Files\Acronis\SnapAPI\; <-- the \

C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\; <-- the \
C:\Program Files (x86)\Microsoft SDKs\TypeScript\; <--- the \

C:\Program Files (x86)\MySQL\MySQL Utilities 1.3.4\;; <--- two semi-colons!!! that should be one semi-colon

So, try that set path=........ command I mention. If it works then you can make it permanent in the GUI. I'd do it for the system path variable and remove the user path variable. (I think the user one appends to the system one, it's unnecessaru unless you want multiple users each with their own slightly different path)

And if it fails.. then you can remove chunks and see if it works, thus troubleshooting it.

added-
If the system path is greyed out, try making the user path blank, (put it in a text file first as a backup). Then click OK, open a cmd prompt window, and now you should try appending a directory to the path within the cmd prompt and see if it works.. So, SET PATH=%PATH%;C:\Program Files (x86)\Git\bin

now type PATH see that the above command did append Git to the Path. And see if Git runs. That tells you that the PATH as it was, has no error in it. That means the System path is OK.. (as the user path was blank so the path there is just the system path). Try not to write any directories in the user path that duplicate what is in the system path, though probably no harm if you do. Then, look at that long set PATH= that I wrote which was an amendment of yours, and execute it at the cmd prompt and see if it works. If it does, then put it in the GUI. If it doesn't then troubleshoot why, by halving it, removing Git, appending Git, see if Git runs. See, if the final directory listed in the Path is searched, then the whole Path is fine. Hopefully that method will enable you to troubleshoot it and fix the Path.

share|improve this answer
    
The edit button for the global PATH is grayed out. –  avorum Nov 10 '13 at 6:39
    
@avorum ok i've added to my answer. –  barlop Nov 10 '13 at 12:30
    
By the way, Ubuntu wasn't around before 2005. What did you use before 2005?! –  barlop Nov 10 '13 at 12:31
    
Yeah, follow those instructions. I noticed a " ;" at the beginning of your user-path. If that's not really a space but a invisible null-character it could be the source of your trouble so strip the " ;" from your user-path first. Also, you have a very long (system-)path. It's >1024 characters. It should work up to 2048 but it's strange it's truncated right at 1040. (i.e. your Git\bin isn't added.) –  Rik Nov 10 '13 at 14:02
    
Thanks for all the suggestions barlop. Managed to fix it by following your suggestions. –  avorum Nov 10 '13 at 15:39

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.