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?



1 Answer 1


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 http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/path.mspx?mfr=true (though this is for XP).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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