0

I am very confused on what is incorrect with my Windows Path variable.

In my System Settings I have the System Variable Path set to:

C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0\;C:\windows\System32\WindowsPowerShell\v1.0\;C:\apache-tomcat-6.0.41-windows-x64\apache-tomcat-6.0.41\bin;C:\ProgramFiles\TortoiseHg;

Yet, when I try to run hg.exe (in C:\Program Files\TortoiseHg) from the command line in another directory it returns "hg is not recognized as an internal or external command, operable program or batch file".

I thought that if I set my Path to include the executable directory, then I could run hg commands from any directory. Why is this not working? How can I make my Path variable set to something global? Maybe I don't understand the difference between a User Environment variable and a System environment variable?

**Note that if I echo %path% from my command line I get something slightly different than what shows in System Variables:

C:\Users\stankard>echo %path%
C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\Wind
owsPowerShell\v1.0\;C:\windows\System32\WindowsPowerShell\v1.0\;%ANT_HOME%\bin;
C:\apache-tomcat-6.0.41-windows-x64\apache-tomcat-6.0.41\bin;C:\ProgramFiles\Tor
toiseHg;C:\ProgramFiles\TortoiseHg\
Dave M
  • 13,250

1 Answers1

1

As AFH points out in his comment, if you've transcribed your path here properly, then you forgot the space in "Program Files".

Additionally, you can't use a environment variables in your path, so "%ANT-HOME%" isn't going to work and could be messing up the paths after it.

See this SU question: Why can't Windows handle an environment variable in Path?