Thanks for your response, let me try to explain:-
The terminal.exe is Terminal Emulator (like hyper term); it
logs in to a hardware device over serial port and runs some command, when it is done it closes itself.
Problem:- The script opens up two terminals
I want it to open a terminal in first pass, wait until the terminal ends, then open the terminal again in second pass.