[英]How can I keep using the command prompt after executing a .cmd file in Windows?
After I double clicked a.cmd file and it executed successfully, it just closed the command prompt window. Even if I add pause
to the end it also closes after I hit any key.在我双击 a.cmd 文件并成功执行后,它只是关闭了命令提示符 window。即使我在最后添加
pause
,它也会在我按下任意键后关闭。 So is there a way to let me keep using the command prompt, just as if I got the window from running cmd
?那么有没有办法让我继续使用命令提示符,就像我从运行
cmd
得到 window 一样?
very simple.很简单的。
Add the following line to the end of your code: start /b cmd
将以下行添加到代码末尾:
start /b cmd
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.