>Hi!
>
>I think you have to put a while do loop that will check the output file...
>
>*******
>wait window "Please wait, creating back-up files...." NOWAIT
>run /n1 winrar a -o+ bb.rar
>do while !file("bb.rar")
>enddo
>wait window "Completed...."
It can be easier using API_APPRUN:
SET CLASSLIB TO Process ADDITIVE
oWinRar = CREATEOBJECT('api_apprun','winrar a -o+ bb.rar',,'MIN')
nSuccess = oWinRar.LaunchAppAndWait()
nExitCode = oWinRar.CheckProcessExitCode()
DO CASE
CASE nSuccess = 1
wait window 'Finished - ' + transform(nExitCode)
CASE nExitCode = 259
wait window 'Still running'
OTHERWISE
wait window oWinRar.icErrorMessage + ' - ' + transform(nExitCode)
ENDCASE
Burns a lot fewer cycles, is interruptible, and access exit codes
>:
>:
>:
>
>--------> Your message
>
>Dear everybody,
>In my program, I write a backup/restore routine which utilize winrar as backup program.
>
>In my segment:
>
>:
>:
>run /n1 winrar a -o+ bb.rar .
>wait window "OKAY" nowait
>:
>:
>
>However, The program switch to next line, before the first line run completed.
>How can I program to do that the wait window preform after the run command completely done.