Home » Questions » Computers [ Ask a new question ]

What environment variables will be used when calling an EXE from command line?

What environment variables will be used when calling an EXE from command line?

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.

Asked by: Guest | Views: 335
Total answers/comments: 1
Guest [Entry]

"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."