开发者

Why does it open command prompt when i excute start hurry.bat?

开发者 https://www.devze.com 2023-03-20 08:57 出处:网络
This is about the START command in batch-files. startnotepad \\\\ opens the notepad but not 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 t开发者_Python百科he batch file but opens the command prompt

Why so? Any reason ? Thank you in advance.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号