I need to know if an executable is available in PATH from a vbscript.
In *nix I would use ‘which’ command to to that.
What do I use in vbscript?
Solution needs to be compatible with WinXP so ‘where’ command is not for me.
I need to know if an executable is available in PATH from a vbscript.
Share
I came up with this:
The
your_execmust be a call to the executable made in such a way that would return immediately, which could be a problem if that executable doesn’t provide some command line option to do so. In my case I’m just calling the executable to show its version:my.exe -version.