[英]How to go back to first command prompt and close it in bat file
I have a bat file in which I call a couple of bat command sequentially: 我有一个bat文件,在其中我依次调用几个bat命令:
start cmd /c a.bat 启动cmd / c a.bat
call b.bat 致电b.bat
The 1st line will run a.bat in a new prompt window, after the 2nd line finish run, I want to go back to the window started from 1st line and close it, how can I achieve that? 第一行将在新的提示窗口中运行a.bat,第二行完成运行后,我想回到从第一行开始的窗口并关闭它,我该如何实现? I need to start a.bat in a different window, since b.bat rely on it to run, I have tried
我需要在其他窗口中启动a.bat,因为b.bat依赖于它来运行,所以我尝试了
call a.bat 呼叫a.bat
call b.bat 致电b.bat
but it never starts b.bat since a.bat starts a server and just wait. 但是它永远不会启动b.bat,因为a.bat将启动服务器并等待。 Any advice would be appreciated.
任何意见,将不胜感激。
Use this and inside a.bat
start the server with start "" "c:\\program files\\folder\\server.exe"
so it will launch and return control to the a.bat
and continue. 使用它并在
a.bat
内部使用start "" "c:\\program files\\folder\\server.exe"
启动服务器,这样它将启动并将控制权返回给a.bat
并继续。
call a.bat
call b.bat
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.