取消批处理脚本中的“按任意键继续" [英] Suppress the 'press any key to continue' in batch script
本文介绍了取消批处理脚本中的“按任意键继续"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在编写批处理脚本.在命令窗口中执行一个阶段后,它会说按任意键继续"并暂停,然后在按下某些按钮后脚本继续.如何在脚本中防止这种情况?
I am writing a batch script. After a stage in the command window it says 'press any key to continue' and halts, and after something is pressed the script continues. How can I prevent this in the script?
推荐答案
这是PAUSE
命令的输出:
PAUSE的问题是,当您从Windows资源管理器中运行批处理文件时(或者您无法读取输出),经常需要这样做,但是在命令提示符下却很烦人.我在这里问了这个问题,有人建议我这样做:
The problem with PAUSE is that it's often necessary when you run a batch file from Windows explorer (or you cannot read the output) but it's annoying in the command prompt. I asked about it here and I was suggested a nifty trick:
这篇关于取消批处理脚本中的“按任意键继续"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文