I'm having some issues when trying to run some programs from the command prompt after adding their executable file paths to the PATH variable. I respected the syntax (; at the end of every path added). Has this ever happened to anyone?
Asked
Active
Viewed 71 times
0
-
2Which your issue? It's not clear – Joe Taras Sep 30 '14 at 08:25
-
How long is your path? It has a max limit. – doctorlove Sep 30 '14 at 08:26
-
1Does it say something like `'foo' is not recognized as an internal or external command, operable program or batch file.` – doctorlove Sep 30 '14 at 08:34
1 Answers
0
You have not told us what problem you are seeing, but it you append the path to a program at the end of PATH thus:
set PATH=%PATH%;"c:\somewhere_else"
you can find the new path nevers gets seen, since there's a hard upper limit on path length. See for example this SO post
One option is to prepend the new location, bearing in mind this will drop other things off the end:
set PATH="c:\somewhere_else";%PATH%
There are various workrounds. For example, I tend to have a few set_path.bat
files in a few different locations that reset my path to what's required for various different tasks.

Community
- 1
- 1

doctorlove
- 18,872
- 2
- 46
- 62