为什么不能在CMD窗口关闭批处理文件执行之后? [英] Why won't the CMD window close after Batch file execution?
本文介绍了为什么不能在CMD窗口关闭批处理文件执行之后?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我试图通过将相应的命令到一个批处理文件来执行的文件。完成文件执行后,命令窗口不会自动关闭。我使用exit命令尝试了太多,但它不会自动关闭窗口。
在我的批处理文件的命令:
启动/ W / B / D%CD%\\项目 - 8 - 新建\\ MyCardApi \\行李箱的\\ src \\ build中\\ BINMyCardApiTest_32d.exe
退出0
解决方案
删除 / B
(和 / W
),从一开始的命令。在 / B
在同一窗口中启动程序和 / W
在程序终止之前保持窗口打开。
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.
这篇关于为什么不能在CMD窗口关闭批处理文件执行之后?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文