为什么我执行start rush.bat时会打开命令提示符?

发布于 2024-11-23 19:15:03 字数 305 浏览 3 评论 0原文

这是关于批处理文件中的 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

何止钟意 2024-11-30 19:15:03

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, like notepad, 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文