Windows10没有了像Windows7一样右键菜单在此处打开命令提示符,即使按住Shift右键菜单也只有在此处打开Powershell窗口,有时候还是CMD命令提示符方便。

以下方法可以添加右键菜单在此处打开命令提示符

1、打开注册表

使用快捷键Windows键+R键打开运行对话框,输入regedit回车打开注册表。

2、添加注册表项

2.1 文件夹右键菜单

HKEY_CLASSES_ROOT\Directory\shell\下创建项OpenCmdHere

OpenCmdHere默认值修改为在此处打开命令提示符

新建字符串值Icon,值修改为cmd.exe

HKEY_CLASSES_ROOT\Directory\shell\OpenCmdHere\下创建项command

command默认值修改为cmd.exe /s /k pushd “%V”

413-1.png

413-2.png

413-5.png

2.2 文件夹空白处右键菜单

HKEY_CLASSES_ROOT\Directory\Background\shell\下创建项OpenCmdHere

OpenCmdHere默认值修改为在此处打开命令窗口

新建字符串值Icon,值修改为cmd.exe

HKEY_CLASSES_ROOT\Directory\Background\shell\OpenCmdHere\下创建项command

command默认值修改为cmd.exe /s /k pushd “%V”

413-3.png

413-4.png

413-6.png

2.3 磁盘右键菜单

HKEY_CLASSES_ROOT\Drive\shell\下创建项OpenCmdHere

OpenCmdHere默认值修改为在此处打开命令窗口

新建字符串值Icon,值修改为cmd.exe

HKEY_CLASSES_ROOT\Drive\shell\OpenCmdHere\下创建项command

command默认值修改为cmd.exe /s /k pushd “%V”

413-7.png

413-8.png

413-9.png

2.4 库右键菜单

HKEY_CLASSES_ROOT\LibraryFolder\background\shell\下创建项OpenCmdHere

OpenCmdHere默认值修改为在此处打开命令窗口

新建字符串值Icon,值修改为cmd.exe

HKEY_CLASSES_ROOT\LibraryFolder\background\shell\OpenCmdHere\下创建项command

command默认值修改为cmd.exe /s /k pushd “%V”

413-11.png

413-12.png

413-10.png

2.5 注册表文件在文章最后,其中addCMD.reg是增加右键菜单的CMD,delCMD.reg是删除右键菜单的CMD,需要重启Windows资源管理器才会生效。

addCMD.reg内容如下:

Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\shell\OpenCmdHere]
@="在此处打开命令提示符"
"Icon"="cmd.exe"
[HKEY_CLASSES_ROOT\Directory\shell\OpenCmdHere\command]
@="cmd.exe /s /k pushd \"%V\""

[HKEY_CLASSES_ROOT\Directory\Background\shell\OpenCmdHere]
@="在此处打开命令窗口"
"Icon"="cmd.exe"
[HKEY_CLASSES_ROOT\Directory\Background\shell\OpenCmdHere\command]
@="cmd.exe /s /k pushd \"%V\""

[HKEY_CLASSES_ROOT\Drive\shell\OpenCmdHere]
@="在此处打开命令窗口"
"Icon"="cmd.exe"
[HKEY_CLASSES_ROOT\Drive\shell\OpenCmdHere\command]
@="cmd.exe /s /k pushd \"%V\""

[HKEY_CLASSES_ROOT\LibraryFolder\background\shell\OpenCmdHere]
@="在此处打开命令窗口"
"Icon"="cmd.exe"
[HKEY_CLASSES_ROOT\LibraryFolder\background\shell\OpenCmdHere\command]
@="cmd.exe /s /k pushd \"%V\""

delCMD.reg内容如下:

Windows Registry Editor Version 5.00
[-HKEY_CLASSES_ROOT\Directory\shell\OpenCmdHere]
[-HKEY_CLASSES_ROOT\Directory\shell\OpenCmdHere\command]
[-HKEY_CLASSES_ROOT\Directory\Background\shell\OpenCmdHere]
[-HKEY_CLASSES_ROOT\Directory\Background\shell\OpenCmdHere\command]
[-HKEY_CLASSES_ROOT\Drive\shell\OpenCmdHere]
[-HKEY_CLASSES_ROOT\Drive\shell\OpenCmdHere\command]
[-HKEY_CLASSES_ROOT\LibraryFolder\background\shell\OpenCmdHere]
[-HKEY_CLASSES_ROOT\LibraryFolder\background\shell\OpenCmdHere\command]
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。