>Hi George,
>Thanx for the referance to the article. It worked. I have a question
>
>how come:
>wshShell=createobj("WScript.Shell")
>wshShell.Run("calc")
>works just fine
>
>but.....
>
>wshShell.run("c:\program files\cadcam\cadcam.exe")
>does not work.
>If I place "c:\program files\cadcam\cadcam.exe" in the RUN textbox, it will work but not when I use the above syntax in the scripting host
>
>And....
>what is the vfp syntax for wshShell.Sleep 100? I tried wshShell.run(100) and that did not work.
>
>Regards,
>Dr. G. (Neil)
The problem you're having is with the embedded spaces in the file name. The string should include the quote marks so the shell realizes it's an LFN.
The answer to the second part is to use the Sleep API call, since VFP doesn't have access to the WScript object itself. You'll find a sample of this in the article on the VFUG site.
George
Ubi caritas et amor, deus ibi est