>Hi,
>
>In a FoxPro6 application I'm using the RUN command to run an external exe. This exe runs ok, but the application is not waiting until the exe is finished. Does anyone know how to solve this?
>
>The code is:
>lcCurrentPath = SYS(5) + CURDIR()
>CD (lcLinkPath)
>RUN &lcLinkProg
>CD (lcCurrentPath)
>
>
>Thanks.
>
>Kind Regards,
>
Tom,
The Windows Script Host's Shell object can do this.
oShell = CREATEOBJECT("WScript.Shell")
oShell.Run(< application >, < Window State >, .T.)
The application name should be the fully qualified path. The Window State parameter is a numeric, 4 activates it at its most recent size and position.
hth,
George
Ubi caritas et amor, deus ibi est