如何右键菜单添加命令提示符
A hidden functionality in Windows allows you to right click on a directory, and select “Command Prompt Here” from the menu.
Windows中的隐藏功能使您可以右键单击目录,然后从菜单中选择“此处命令提示符”。
Here’s the registry hack to get this working. Make sure you back up your registry just in case. I’ll show you the step-by-step method, but you can skip down to the bottom for the alternate reg file.
这是使此工作正常的注册表黑客。 确保备份注册表以防万一。 我将向您展示分步方法,但您可以跳至底部查找备用reg文件。
Step-By-Step Method:
分步方法:
Type regedit.exe into the Start\Run dialog, and then navigate to the following registry key:
在“开始\运行”对话框中键入regedit.exe,然后导航到以下注册表项:
HKEY_CLASSES_ROOT\Directory\shell
HKEY_CLASSES_ROOT \ Directory \ shell
Once you are at that key, right click and choose the New Key option:
进入该键后,右键单击并选择“新建键”选项:
Name the key “CommandPrompt” without the quotes and then double-click on the default value. Change the text to “Command Prompt Here” as seen here:
将键“ CommandPrompt”命名为不带引号的名称,然后双击默认值。 如下所示,将文本更改为“ Command Prompt Here”:
Right click on the new Command key and select New key, as you did before. Name the new key Command as well, and then double-click the default value of that key. Set the text of that key to this:
像以前一样,右键单击新的Command键并选择New key。 也将新密钥命名为Command,然后双击该密钥的默认值。 将该键的文本设置为此:
cmd.exe /k cd %1
cmd.exe / k光盘%1
You can see what it should look like here:
您可以在此处看到它的外观:
Now when you right click on the folder, you should see this dialog:
现在,当您右键单击该文件夹时,应该会看到以下对话框:
That will open up a prompt like this:
这将打开如下提示:
Alternate method:
替代方法:
You can create a text file named anything.reg, and insert this text into it:
您可以创建一个名为any.reg的文本文件,并将此文本插入其中:
Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT\Directory\shell\CommandPrompt] @=”Command Prompt:” [HKEY_CLASSES_ROOT\Directory\shell\CommandPrompt\Command] @=”cmd.exe /k cd %1″
Windows注册表编辑器版本5.00 [HKEY_CLASSES_ROOT \ Directory \ shell \ CommandPrompt] @ =“命令提示符:” [HKEY_CLASSES_ROOT \ Directory \ shell \ CommandPrompt \ Command] @ =“ cmd.exe / k cd%1”
Double click on that file, and the text will be entered into the registry, and you’ll have the same right click command prompt.
双击该文件,文本将输入到注册表中,您将具有相同的右键单击命令提示符。
如何右键菜单添加命令提示符