![右键没有在此处打开命令窗口](https://img-blog.csdnimg.cn/img_convert/693511338a3ed025aaecb8ca5a15bbcd.png)
右键没有在此处打开命令窗口
![](https://img-blog.csdnimg.cn/img_convert/03a4bafa5b4b466efcfe6e3f163000b4.png)
The Windows 10 Creators Update removes the Command Prompt command from context menus in favor of using PowerShell. Here’s how to put it back.
Windows 10 Creators Update从上下文菜单中删除了命令提示符命令,以支持使用PowerShell。 这是将其放回原处的方法。
- Open Registry Editor. 打开注册表编辑器。
- Navigate to HKEY_CLASSES_ROOT\Directory\shell\cmd. 导航到HKEY_CLASSES_ROOT \ Directory \ shell \ cmd。
- Take ownership of the cmd key. 取得cmd密钥的所有权。
- In the cmd key, rename the HideBasedOnVelocityID value by putting an underscore (_) before its name. 在cmd键中,通过在其名称前加上下划线(_),重命名HideBasedOnVelocityID值。
- Exit Registry Editor. 退出注册表编辑器。
The Creators Update for Windows 10 really pushes you to use PowerShell instead of Command Prompt, replacing the shortcut on the Windows+X Power User menu and the extended context menu you get when you Shift+right-click a folder in File Explorer. We’ve already showed you how to put Command Prompt back on the Power Users menu. If you’re willing to dive into the Windows Registry for a quick change, you can also add it back your context menus. Plus, this technique doesn’t remove the PowerShell command. You get both!
Windows 10的Creators Update确实促使您使用PowerShell而不是命令提示符,替换了Windows + X Power User菜单上的快捷方式以及Shift +右键单击文件资源管理器中的文件夹时获得的扩展上下文菜单。 我们已经向您展示了如何将“命令提示符”放回“高级用户”菜单上 。 如果您愿意深入了解Windows注册表以进行快速更改,也可以将其添加回上下文菜单中。 另外,此技术不会删除PowerShell命令。 你们两个都得到!
Note: The techniques in this article only apply to PCs that have been upgraded to the Windows 10 Creators Update. If you’re not running it yet, you won’t need this trick anyway, since you still have Command Prompt on your context menus.
注意:本文中的技术仅适用于已升级到Windows 10 Creators Update的 PC。 如果尚未运行它,则无论如何都将不需要此技巧,因为上下文菜单上仍具有命令提示符。
通过手动编辑注册表将“此处打开命令窗口”添加到上下文菜单 (Add “Open Command Window Here” to Context Menus by Editing the Registry Manually)
To put the Command Prompt command back on your context menus, you just need to make a single edit in the Windows Registry.
要将命令提示符命令放回到上下文菜单中,只需在Windows注册表中进行一次编辑。
Standard warning: Registry Editor is a powerful tool and misusing it can render your system unstable or even inoperable. This is a pretty simple hack and as long as you stick to the instructions, you shouldn’t have any problems. That said, if you’ve never worked with it before, consider reading about how to use the Registry Editor before you get started. And definitely back up the Registry (and your computer!) before making changes.
标准警告 :注册表编辑器是一个功能强大的工具,滥用它会使您的系统不稳定甚至无法运行。 这是一个非常简单的技巧,只要您按照说明进行操作,就不会有任何问题。 也就是说,如果您以前从未使用过它,请在开始之前考虑阅读有关如何使用注册表编辑器的信息 。 并在进行更改之前一定要备份注册表 (和您的计算机 !)。
Open the Registry Editor by hitting Start and typing “regedit.” Press Enter to open Registry Editor, and then give it permission to make changes to your PC.
通过单击开始并键入“ regedit”来打开注册表编辑器。 按Enter打开“注册表编辑器”,然后授予它对PC进行更改的权限。
![own_1](https://img-blog.csdnimg.cn/img_convert/035eeb456d42ce6ac7f0704cfee93c86.png)
In the Registry Editor, navigate to the following key:
在注册表编辑器中,导航到以下项:
HKEY_CLASSES_ROOT\Directory\shell\cmd
![](https://img-blog.csdnimg.cn/img_convert/07b31e782a9f724715a57701a5389d6e.png)
Note: You can drill down to that key the old-fashioned way, but note that the Creators Update also makes the long-awaited change of adding an address bar to Registry Editor. So, you can just copy that location, paste it into the address bar, and hit Enter. Very handy!
注意:您可以按老式的方式向下钻取该键,但是请注意,创建者更新还对将注册表添加地址栏进行了期待已久的更改。 因此,您可以复制该位置,将其粘贴到地址栏中,然后按Enter。 非常便利!
By default, the cmd
key is protected from changes. You’ll need to take ownership of it and then give yourself full permissions to edit it. We’ve got a great guide on gaining full permissions to edit protected Registry keys, so use the instructions there to gain access to the cmd
key before continuing on with these instructions.
默认情况下, cmd
密钥不受更改。 您需要拥有它的所有权,然后为自己授予编辑它的全部权限。 我们获得了完整的权限来编辑受保护的注册表项 ,这是一个很好的指南 ,因此在继续执行这些说明之前,请使用此处的说明来获取对cmd
项的访问权限。
After gaining control of the cmd
key, you’re going to make one small change to one of the values inside it. Right-click the HideBasedOnVelocityId
value and select the “Rename” command. Just put an underscore ( _
) at the beginning of the value’s existing name. All we’re doing here is making the value not register.
获得cmd
键的控制权后,您将对其内部的值之一进行一些小的更改。 右键单击HideBasedOnVelocityId
值,然后选择“重命名”命令。 只需在值的现有名称的开头加上下划线( _
)。 我们在这里所做的就是使值不注册。
![](https://img-blog.csdnimg.cn/img_convert/2f66542c57228ab4fbb77d536d77874b.png)
And that’s all you have to do. The changes take place immediately, so test it by Shift+right clicking a folder and making sure the “Open command window here” command is back. (Note: You can no longer Shift+right click on an empty space within a folder like you use to be able to, you must Shift+right click on an actual folder for this to work.)
这就是您要做的。 更改会立即发生,因此通过按住Shift并右键单击一个文件夹并确保返回“此处打开命令窗口”命令来进行测试。 (注意:您不能再像以往那样按住Shift +右键单击文件夹中的空白区域,而必须按住Shift +右键单击实际文件夹才能执行此操作。)
![](https://img-blog.csdnimg.cn/img_convert/f7e09392a6ed4c2c31c4386c4de42a99.png)
If you want to remove the command again sometime in the future, just go back to the cmd
key and remove the underscore you added to the HideBasedOnVelocityId
value’s name.
如果要在将来的某个时间再次删除该命令,只需返回cmd
键,然后删除添加到HideBasedOnVelocityId
值名称中的下划线即可。
下载我们的一键式注册表黑客 (Download Our One-Click Registry Hacks)
![](https://img-blog.csdnimg.cn/img_convert/7f71ab5be91db05fead728a6f133cfca.png)
If you don’t feel like diving into the Registry yourself, we’ve created some registry hacks you can use. The “Put Command Prompt on Context Menu” hack modifes the value you need to put the Command Prompt command back on the context menu. The “Remove Command Prompt on Context Menu (Default)” hack removes the command, restoring the default state and leaving only the PowerShell command. Both hacks are included in the following ZIP file.
如果您不想自己进入注册表,我们已经创建了一些可以使用的注册表黑客。 “在上下文菜单上放置命令提示符” hack修改了将命令提示符命令放回上下文菜单所需的值。 “删除上下文菜单上的命令提示符(默认)” hack会删除该命令,还原默认状态,仅保留PowerShell命令。 这两种黑客都包含在以下ZIP文件中。
Command Prompt Context Menu Hacks
These hacks are really just the cmd
key, stripped down to the HideBasedOnVelocityId
value we talked about in the previous section and then exported to a .REG file. Running the hacks modifies the value. And if you enjoy fiddling with the Registry, it’s worth taking the time to learn how to make your own Registry hacks.
这些技巧实际上只是cmd
密钥,被简化为我们在上一节中讨论的HideBasedOnVelocityId
值,然后导出到.REG文件。 运行hack会修改值。 而且,如果您喜欢使用注册表,则值得花时间学习如何制作自己的注册表黑客 。
右键没有在此处打开命令窗口