1

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
4

3 回答 3

1

/w参数会START等待它启动的进程退出。去掉它:

start "" /B /d ...

这将使您的批处理文件继续运行并立即退出。

于 2013-09-11T10:19:12.007 回答
1

从 start 命令中删除/b(和)。/w/b同一窗口中启动程序并/w保持窗口打开直到程序终止。

于 2013-09-11T13:49:42.533 回答
-1

您可以在最后关闭控制台

例如:

   start /b taskkill /F /IM bank01.exe
   ..
   ..
   taskkill /F /IM cmd.exe
于 2014-10-02T23:40:04.113 回答