in reply to Locating browser location?

If the PATH environment var is right set, run your program without the if() test.