I am trying to execute a file by placing the appropriate command into a batch file. After completing the file execution the command window is not closing automatically. I tried it with the Exit command too but it is not closing the window automatically.
The command in my batch file:
start "" /w /B /d "%CD%\Project-Aug-New\MyCardApi\trunk\src\build\bin" MyCardApiTest_32d.exe
exit 0
Remove the /b
(and the /w
) from the start command. The /b
starts the program in the same window and the /w
keeps the window open until the program terminates.
The /w
parameter makes START
wait until the process it launches has exited. Remove it:
start "" /B /d ...
This will let your batch file continue running and exit immediately.
You can close the console at the end
For example:
start /b taskkill /F /IM bank01.exe
..
..
taskkill /F /IM cmd.exe