>Hi all
>
>I have this ShellExecute declaration and execution working well. But it seems that ShellExecute does not wait for the process to complete and then proceed with VFP code execution.
>
>Is there any way or another equivalant win-api that waits for the process to complete before it returns control to VFP?
>
>Please advise.
I know you have the answer to your question, but there is another way to do this that, IMO, is simpler. Ed and I wrote about this in the October 2000 issue of the VFUG newsletter, that's available on-line at
www.vfug.org.
oShell = CREATEOBJECT('WScript.Shell')
oShell.Run('myexe.exe', 5, .T.)
The "myexe.exe" should be replaced by the fully qualified path of the executable. 5 = SW_SHOWNORMAL and the .T. parameter indicates that the calling application should wait until the called application terminates.
George
Ubi caritas et amor, deus ibi est