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.
精彩评论