Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Let's say I have two folders listed in my Path environment variable like so:

"C:\FolderA; C:\FolderB"

And within each of those folders, I have a program named "testprog.exe". When I open a command window and type "testprog.exe". Which one will be run? What if testprog.exe in FolderB is a later version of the testprog.exe in FolderA? Does the system care? Is it indeterminate which one will run? What happens?



share|improve this question
up vote 7 down vote accepted

The one in FolderA will be run.

The path is evaluated in the order it is listed, with the current folder preceding it.

Windows doesn't care about the version of the application.

See (though this is for XP).

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.