--- In [EMAIL PROTECTED], Alex Peters <[EMAIL PROTECTED]> wrote:
> Use this script if you want to circumvent %COMSPEC%:
> 
> ; --- script begins here
> 
> Local EXEFile = "Notepad.exe"
> 
> ; ---
> 
> Local EXEOnPath = 0
> Local Path = ReplaceChars(Env("Path"), ";", "'n")
> 
> For(Local Iter = 1; Iter LE Line(Path, 0); Iter = Iter + 1)
>     If(ValidPath(Line(Path, Iter) ++ "\" ++ EXEFile))
>         EXEOnPath = 1
> EndFor
> 
> MessageBox("Information", EXEFile ++ " is on PATH: " ++ EXEOnPath)
> 
> ; --- script ends here

Good solution!
Actually I thought of a similar solution with "validpath() ++ ||" but
I personally kind of prefer avoiding "For() Syntax" if possible.
Since my script I posted before is likely to cause an error though I
didn't test it, your solution should be the choice.

BTW, how could I neglect %PATH% while using %comspec%?




****  EDIT YOUR POSTINGS !!!! ****
Please remove as much as possible from original messages before replying to them.
________________________________________________ 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
     http://groups.yahoo.com/group/power-pro/

<*> To unsubscribe from this group, send an email to:
     [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
     http://docs.yahoo.com/info/terms/
 

Reply via email to