Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

Thanks,

-Robert

share|improve this question
add comment

1 Answer

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

share|improve this answer
add comment

Your Answer

 
discard

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.