Win + R
, 输入 regedit-
展开到路径:
HKEY_CLASSES_ROOT\directory\background\shell\cmd
输入名字 Cmd Here -
展开到如下路径:
HKEY_CLASSES_ROOT\directory\background\shell\cmd\command
输入命令cmd.exe /s /k pushd \"%V\"
- 同样的路径应该还存在于
HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory
. 不过上述路径配置好以后这个路径应该自动完成了, 无须再次输入(如果不正常可以考虑确认一下)
- 如果没有效果还可以考虑删除
HKEY_CLASSES_ROOT\directory\background\shell\cmd
层级下除默认值以外的其他内容
也可以把如下内容保存到本地的 *.reg
文件中双击运行:
下载地址 (右键另存为)
Windows Registry Editor Version 5.00
; This script only process [HKEY_CLASSES_ROOT\directory]
; Another place is [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory]
; delete old registry(by using a "-" before the key)
[-HKEY_CLASSES_ROOT\directory\background\shell\cmd]
[-HKEY_CLASSES_ROOT\directory\shell\cmd]
; add new rigistry
; Folder background
[HKEY_CLASSES_ROOT\directory\background\shell\cmd]
@="Cmd Here"
[HKEY_CLASSES_ROOT\directory\background\shell\cmd\command]
@="cmd.exe /s /k pushd \"%V\""
; Folder hit
[HKEY_CLASSES_ROOT\directory\shell\cmd]
@="Cmd Here"
[HKEY_CLASSES_ROOT\directory\shell\cmd\command]
@="cmd.exe /s /k pushd \"%V\""
Comments