>George,
> I didn't know if he had WSH installed on all machines. That is typically what I do, but what is the call to make the VFP wait for the called program to finish? Here is a typical function I would use, what do you change to make it wait?
>
>
>=lNetSend( GETFILE( ) )
>
>FUNCTION lNetSend
> PARAMETERS tcOpenMe
>
> oShell = CREATEOBJECT( 'WScript.Shell' )
> oShell.Run( tcOpenMe )
> oShell = .NULL.
> RELEASE oShell
>
>ENDFUNC
>
John,
The Run method supports 3 parameters. The first, of course, is either the executable or document to be run. The second is the window type. The value, I believe, correspond to the same ones that ShellExecute supports. It is optional. The third, is a logical (also optional) value as to whether or not to wait for the executable to terminate. The code below, similar to your work above (with some modification), demonstrates this.
lcfile = GETFILE("*")
IF NOT EMPTY(lcfile)
oShell = CREATEOBJECT("WScript.Shell")
oShell.Run(lcfIle, 4, .T.)
oShell = NULL
ENDIF
George
Ubi caritas et amor, deus ibi est