网上介绍的方法很多,其中将HKEY_CLASSES_ROOT\Directory\shell\cmd
下面的HideBasedOnVelocityId
改为ShowBasedOnVelocityId
,经测试无效。本地环境是Windows 10 Home Edition。实际有效的做法是将下面的文本另存为reg文件:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\Background\shell\normal_cmd]
@="Cmd Here"
"Icon"="cmd.exe,0"
[HKEY_CLASSES_ROOT\Directory\Background\shell\normal_cmd\command]
@="cmd.exe /s /k pushd \"%V\""
[HKEY_CLASSES_ROOT\Directory\shell\normal_cmd]
@="Cmd Here"
"Icon"="cmd.exe,0"
[HKEY_CLASSES_ROOT\Directory\shell\normal_cmd\command]
@="cmd.exe /s /k pushd \"%V\""
然后双击文件完成导入。导入后打开任务管理器(taskmgr),找到:Windows资源管理器的进程,选中后,再选择窗口右下角的“重新启动”,刷新一下explorer.exe进程,让注册表生效,然后就能在右键菜单中看到“在此处打开命令窗口”选项了。
参考:
https://www.webiboo.com/simplest-way-to-add-open-command-window-here-option-on-win-10-context-menu