A commercial code (code_A) runs on command line window (win2k and win9x). After the job is submitted, the control will be returned to the window immediately and two or three consecutive sub-programs (p1, p2 & p3) on background (cpu time = 1 min. to 2 weeks). The sub-program shows in processes window of task manager, but does not show in application window of task manager. Since the code is commercial software, sometime the sub-programs are suspend for network license.
I like to have a batch file that runs the code_A iteratively (100 times). The question is how to wait for the job (p2 or p3) to finish in the batch file?