The 'which' utility, when run with a parameter naming an executable, will tell you the first executable with that name it finds in your path, if found at all. This gives a good idea which version of the executable will be run. (Forgive me if this description is incomplete, but it conveys the general idea)
I'm looking for either a port of the 'which' utility, a Powershell command, or some other utility I'm not aware of that does the same thing.
I have looked at the following SO question (and will try the for loop logic in the selected answer). I'd prefer to have a single command that implements this functionality and want to see if that exists. If something like that doesn't exist, that logic would be fairly easily put into a script:
unix "which java" equivalent command on windows?
The "winwhich" utility on CodeProject exists. It hasn't been updated in 6 years or so and, when built on my Win 7 machine with VS 2010, crashed upon running. I plan to do my due diligence to find out why it crashed, but don't have time until tonight.
Has anybody used another utility or command on Windows to emulate this functionality?