2

If you invoke nmake ( or any exe) on command line in Windows, Windows will search through all the path variables and append the directory to front of the nmake and execute it.

Besides path, is there any other environmental variable that Windows will search and append to the front of nmake?

3 Answers 3

1

no, not that i know.

(and i do not consider PATHEXT as answer ... it just APPENDS some patterns to the thing you throw at CMD to find the right binary)

1

PATH is the only environment variable that contains locations that Windows will prepend to your command to find a program to run. However, Windows does use the PATHEXT variable to determine what file extensions to append to your command to find a file to run.

The algorithm is a bit like this:

  • for each entry in PATH, do until a file is found:
    • file = entry + command; check for file
    • for each entry in PATHEXT, do until a file is found:
      • file = file + entry; check for file
  • if a file was found, run it
0

No.

PATH is an environment variable the shell uses to resolve under-specified executable locations. When you type nmake, the shell first looks in the current directory for something it can run (nmake.exe, nmake.bat, etc.) and executes it if it's found. If not, it then looks at each directory specified in PATH looking for the exectuable and runs the first one it finds.

There's nothing special about PATH except that it's the variable the shell uses for this purpose. There's no reason the shell would try to use any other variable for this purpose.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .