0

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?

user22277
  • 117
  • 2
  • 14

1 Answers1

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