>Hi all,
>
>
>I USE winexec to lauch a programm. But i want that VFP Don't continue before the programm is not completed.
>it 's possible with winexec ?
>
>
>DECLARE INTEGER WinExec IN kernel32 STRING lpCmdLine, INTEGER nCmdShow
>* WinExec ( "G:\BOB\BOBLINK /CIE=BO /USR=BM /MOD=ACCOUNT /MNF=BOACCOUN.DB /AUTOCLOSE" , SW_NORMAL )
>*-- Sur le conseil de bOB
>cOldSetDefault = SYS(5) + CURDIR()
>SET DEFAULT TO ( goapp.cDirBobapp )
>WinExec( m.cValue , SW_NORMAL )
>
>
>
>thank in advance
>
>
>bernhart
Use wscript instead. The .t. as the last parameter means it is going to wait until notepad is closed.
WshShell = CreateObject("WScript.Shell")
ReturnCode = WshShell.Run("%windir%\notepad.exe", 1, .t.)
MESSAGEBOX("Done")