From within a ODS batch script I call/start an external program similar to
...
D:\aaa\bbb\ccc\NetTraffic.exe
Echo after call
....
Yes, the external program is successfully started but the script does NOT continue to run.
The Echo statement is never executed.
Is this normal?
That would mean I always have to call/start external programs by
start "" /B C:\WINDOWS\system32\cmd.exe /c "D:\aaa\bbb\ccc\NetTraffic.exe"
Is this true?
Peter
Batch script stops forever when calling external exe program?
Moderator: DosItHelp
Re: Batch script stops forever when calling external exe program?
Code: Select all
start "" /B "D:\aaa\bbb\ccc\NetTraffic.exe"
Re: Batch script stops forever when calling external exe program?
If you call an external executables within a batch file using a statement formed of that executables location, name and some optional parameters, then the executable is part of this batch processing:
That means that as long as that executable is running the batch file is processing that statement.
The batch only proceeds after the statement has been processed, which means the external executable finished.
According to the above explaination:
No.
Here is an example (using the external executable "findstr.exe"):
Code: Select all
@echo off
echo Hello world!
@echo Test: OK. | findstr "^"
echo Bye.
pause
Code: Select all
@echo off
echo Hello world!
findstr "^"
echo Bye.
pause