This essentially emulates the unix "which".
getProgram(PROG_NAMES)
PROG_NAMES
a vector of program names to search for.
a vector of absolute paths to the executables specified.