×

Windows Shift + 鼠标右键添加打开CMD窗口

hqy hqy 发表于2023-04-07 10:51:07 浏览1062 评论0

抢沙发发表评论

Windows 中按住 Shift + 鼠标右键弹出菜单中可以选择 Powershell 打开当前路径的 Shell 窗口。虽然 Powershell 很强大,但是自己习惯了CMD,所以还是改一下吧。

创建一个 reg 文件,将代码内容放到文件中,然后执行导入注册表就可以了。

非管理员模式

Windows Registry Editor Version 5.00
[-HKEY_CLASSES_ROOT\Directory\Background\shell\OpenCmdHere]
[HKEY_CLASSES_ROOT\Directory\Background\shell\OpenCmdHere]
@="在此处打开命令行窗口"
"Extended"=""

[HKEY_CLASSES_ROOT\Directory\Background\shell\OpenCmdHere\command]

@="cmd.exe -noexit -command Set-Location -literalPath '%V'"

管理员模式

Windows Registry Editor Version 5.00


[-HKEY_CLASSES_ROOT\Directory\Background\shell\runas]

[HKEY_CLASSES_ROOT\Directory\Background\shell\runas]
@="在此处打开命令行窗口(管理员)"
"Extended"=""
"HasLUAShield"=""

[HKEY_CLASSES_ROOT\Directory\Background\shell\runas\command]
@="cmd.exe /s /k pushd \"%V\""



[-HKEY_CLASSES_ROOT\Drive\shell\runas]

[HKEY_CLASSES_ROOT\Drive\shell\runas]
@="在此处打开命令行窗口(管理员)"
"Extended"=""
"HasLUAShield"=""

[HKEY_CLASSES_ROOT\Drive\shell\runas\command]
@="cmd.exe /s /k pushd \"%V\""



[-HKEY_CLASSES_ROOT\LibraryFolder\background\shell\runas]

[HKEY_CLASSES_ROOT\LibraryFolder\background\shell\runas]
"Extended"=""
"HasLUAShield"=""
@="在此处打开命令行窗口(管理员)"

[HKEY_CLASSES_ROOT\LibraryFolder\background\shell\runas\command]




推荐本站淘宝优惠价购买喜欢的宝贝:

image.png

本文链接:https://www.jinbel.cn/post/3809.html 非本站原创文章欢迎转载,原创文章需保留本站地址!

分享到:
打赏

群贤毕至

访客

您的IP地址是: