为什么我执行start rush.bat时会打开命令提示符?
这是关于批处理文件中的 START 命令。
start notepad \\ opens the notepad but not the command prompt
start www.google.com \\ opens the google.com but not the command prompt
start hurry.bat\\ starts executing the batch file but opens the command prompt
为什么会这样呢?有什么理由吗?先感谢您。
This is about the START command in batch-files.
start notepad \\ opens the notepad but not the command prompt
start www.google.com \\ opens the google.com but not the command prompt
start hurry.bat\\ starts executing the batch file but opens the command prompt
Why so? Any reason ? Thank you in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
notepad.exe
是一个图形用户界面 (GUI) 程序:它在 GUI 中与用户交互,不需要控制台窗口(命令提示符)。www.google.com
被解释为一个互联网地址,为了处理它(打开相应的互联网页面),Windows 调用您的默认浏览器,它也是一个 GUI 程序,如记事本
,所以,同样,不需要命令提示符。现在,批处理文件只是一个包含一组命令(脚本)的文本文件。它不能自行执行,需要一个程序来解释命令。
CMD.EXE
(“命令提示符”)正是执行该工作的程序。notepad.exe
is a graphic user inteface (GUI) program: it interacts with the user in GUI and doesn't need the console window (command prompt).www.google.com
is interpreted as an internet address, and in order to process it (open the corresponging internet page) Windows calls your default browser, which is a GUI program too, likenotepad
, so, again, no command prompt needed.Now, a batch file is merely a text file containg a set of commands, a script. It cannot execute by itself and needs a program to interprete the commands.
CMD.EXE
(the 'command prompt') is exactly the program that does that job.