Program does not start correct with "Shell"

I start a external program with script on a local client. But it seems, that the programm starts, but will be execute after agent is finished (get free system-time, after Notes has finished). If I use the debug - modus the script works correct.

What should I do?

Subject: RE: Program does not start correct with “Shell”

Shell starts the program right away, but doesn’t wait for it to finish. The reason it works better when you use debug, is that there’s enough time when you step thru the code for the program you shell out to to finish before you get to the next statement.

To run a program and wait for it to finish, you’ll need to make OS calls.