Search path for executable

fair point but I think if you know in advance the exe you want to check it’s a simple and effective way especially if you do as tkelman suggestions and use it with a flag such at -h
BTW
with your script the @static is not necessary
Also oddly enough this check:
uperm(file) & 0x01 > 0
fails for exe that I can actually execute on windows
e.g. something as simple as
“cmd.exe” fails with that check since it has permission 06 even thought it is executable