什么是命令提示符和CMD之间的区别? [英] what's the difference between command prompt and cmd?

查看:375
本文介绍了什么是命令提示符和CMD之间的区别?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Windows 7中,Windows 8和Windows 10系统,他们都行为类似。

I have Windows 7, Windows 8 and Windows 10 systems and they all behave similarly.

当我键入命令提示符进入开始菜单和preSS输入,将出现一个窗口标题为命令提示符。我给它一个蓝色的背景和一个绿色的文字。当我输入开始,CMD或BAT文件到命令行的名称,它开辟了题为CMD窗口,它给了我黑色的背景和一个绿色的文字。看来颜色得到保存,但...嗯...

When I type command prompt into the start menu and press enter, a window titled Command Prompt appears. I gave it a blue background and a green text. When I type start, cmd, or the name of a bat file into the command line, it opens up a window titled cmd, which I gave a background of black and a green text. It seems the colors get stored but... hmm...

当我键入cmd进入Windows 10的启动菜单,窗口标题为CMD出现,但回忆起从命令提示符窗口中的蓝色背景和绿色文字,但输入 CMD 从窗口打开一个新的风格的黑色和绿色。当我双击一个批处理文件,它打开了一个不同的字体和黑色背景,白色文本的窗口标题为命令提示符。当我键入​​命令它只是打印DOS和版权头,但是 start命令打开一个标题为窗口COMMAND.COM用不同的字体和黑色背景,白色的文字。

When I type cmd into the start menu of Windows 10, a Window titled "cmd" appears, but it recalls the blue background and green text from the Command Prompt window, but typing cmd from that window opens a new one styled black and green. When I double click a batch file, it opens up a window titled command prompt with a different font face and a black background with white text. When I type command it just prints the DOS and copyright headers, but start command opens up a window titled COMMAND.COM with the different font face and the black background with white text.

当键入 CMD /?到的参数列表出现在屏幕上。其中之一是/ Q。它说,它变成了新的实例回显。当我在任何命令提示符或CMD输入 CMD / Q ,它会替换另一个使用相同的标题,但黑色和绿色的配色方案的窗口,并不会关闭回声。当我键入​​ ,启动CMD / Q同样的事情发生,但启动CMD.EXE / Q'实际上产生错误,指出/ Q是不是一个有效的开关

When type cmd /? into a list of parameters appears in on the screen. One of them is /Q. It says it turns echo off in the new instance. When I type cmd /Q in either command prompt or cmd, it replaces the window with another using the same title but the black and green color scheme, and does NOT turn off echo. When I type start cmd /q, exactly the same thing occurs, but 'start cmd.exe /q' actually produces an error stating that /Q isn't a valid switch.

这真的只是我在这里面临的问题的一小部分,而我甚至不能开始启动分拣出来。如果一些老将在那里谁知道命令提示符的外观树林之间,并呼吁他们的所有方式的细微差别,我倒是AP preciate那个人整理那些乱七八糟了我。

This really is only a fraction of the problem I'm facing here, and I can't even begin to start sorting it out. If some veteran out there who knows all the subtle differences between the apparent grove of command prompts, and ways of calling them, I'd appreciate that person sorting that mess out for me.

推荐答案

我会尽力澄清一些混乱,但我不能做得很完美,因为微软已确保使混乱不可能完全排解, 的他们改变了Windows的每个版本的混乱。因此,例如,一些信息我将提供可能并不适用于Windows 8和Windows 10,但它并申请直到和包括Windows 7。

I will try to clear up some of the confusion, but I cannot do a perfect job, because Microsoft has made sure to make the mess impossible to completely untangle, and they change the mess with every version of windows. So, for example, some of the information I am about to provide might not apply to Windows 8 and Windows 10. But it did apply up until and including Windows 7.

命令提示符在Windows下的控制台应用程序的正式名称。 cmd.exe的(或只是CMD)是相同的应用程序的可执行的二进制文件的名称

"Command Prompt" is the formal name of the console application under windows. "cmd.exe" (or just "cmd") is the name of the executable binary file of that same application.

的Windows存储的默认的注册表中的命令提示符设置,在 HKEY_CURRENT_USER \\控制台。当一个新的命令提示符打开,窗户采取了命令提示符窗口标题,然后尝试,看看是否有在 HKEY_CURRENT_USER \\控制台\\ 这个名字。如果找到一个子项,从中可以读取值。如果它没有找到一个子项,它读取它找到 HKEY_CURRENT_USER \\控制台的默认值。

Windows stores the default settings for the command prompt in the registry, under HKEY_CURRENT_USER\Console. When a new command prompt opens, windows takes the window title of that command prompt, and tries to see whether there is a subkey under HKEY_CURRENT_USER\Console\ with that name. If it finds a subkey, it reads the values from it. If it does not find a subkey, it reads the default values it finds in HKEY_CURRENT_USER\Console.

例如,我的系统上,存在一个 HKEY_CURRENT_USER \\控制台\\ MySQL的5.6命令行客户端 - 统一code 键,最有可能是因为MySQL的安装程序创建该键的命令提示符下看起来从命令提示符的其他实例不同。当然,为了使这项工作,这将启​​动自己的命令提示符必须指定快捷键的MySQL 5.6命令行客户端 - 统一code。作为命令提示符窗口的标题

For example, on my system, there exists a HKEY_CURRENT_USER\Console\MySQL 5.6 Command Line Client - Unicode key, most probably because the MySQL installer created this key so that their command prompt looks different from other instances of the command prompt. Of course, in order for this to work, the shortcut which starts their command prompt must specify "MySQL 5.6 Command Line Client - Unicode" as the window title of the command prompt.

所以,如果你看到的命令以不同的造型提示,这可能是因为你必须在 HKEY_CURRENT_USER \\控制台\\ 项。而且,它似乎并没有任何意义的事实是由于这样的事实,选择的子项依赖于的标题的命令提示符窗口,这可能会有所不同取决于你如何启动的。

So, if you are seeing command prompts with different styling, that's probably because you have entries under HKEY_CURRENT_USER\Console\. And the fact that it does not appear to make any sense is due to the fact that the subkey selected depends on the title of the command prompt window, which may differ depending on how you start it.

这篇关于什么是命令提示符和CMD之间的区别?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆