|
Answer» I am having a problem with batch files and would like to SOLICIT some help.
I am using an automation tool to run some scheduled processes. One of the steps within a process is to run a windows executable. The tool will start the executable using a batch file. Once the batch file exits, the tool recognizes that step as complete and GOES on to the next step of the process. The problem is that the executable is still running long after the batch file closes. So, it is not really finished and the tool should not proceed to the next step.
I have tried to call the batch file from within another batch file as below:
1.bat @echo off echo Start executable... call 2.bat echo End of executable...
2.bat @echo off program_I_want_to_run.exe
Once 2.bat is running, 1.bat closes and the tool goes to the next step in the process
I thought that when you call another batch file, the initial batch file stays open.
I am on XP.
ps the tool is BMC's Control-M for Distrbuted Systems. thank you.OK,
it is not the batch file and call that is the ISSUE . It is the executable. Once it is STARTED from 2.bat, 2.bat exits and returns to 1.bat.
My revised question is how do I keep 2.bat open until the executable is finished?Quote OK,
it is not the batch file and call that is the issue . It is the executable. Once it is started from 2.bat, 2.bat exits and returns to 1.bat.
My revised question is how do I keep 2.bat open until the executable is finished? MAybe with the STATEMENT start? So: 2.bat @echo off start program_i_want_to_use.exe and you might need to end the 2.bat with a pause statement.
|