您的位置:首页 > 其它

Windows 10快速在指定目录打开命令行

2018-01-16 14:41 246 查看
转自:http://blog.csdn.net/xfyangle/article/details/75030062

一、我们在想要到达的目录上按住shift键并点击鼠标右键。看到了吗,这时候在弹出菜单里多了一个选项,就是“在此处打开命令窗口”,我们点开看一下。



二、不过有时候我们需要以管理员的权限来打开命令行,这时候我们需要自行添加一个脚本,方便操作,你可以复制下面的代码然后保存为.reg格式。
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\shell\runas]
@="Open cmd here as Admin"
"HasLUAShield"=""
[HKEY_CLASSES_ROOT\Directory\shell\runas\command]
@="cmd.exe /s /k pushd \"%V\""
[-HKEY_CLASSES_ROOT\Directory\Background\shell\runas]
[HKEY_CLASSES_ROOT\Directory\Background\shell\runas]
@="Open cmd here as Admin"
"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]
@="Open cmd here as Admin"
"HasLUAShield"=""
[HKEY_CLASSES_ROOT\Drive\shell\runas\command]

[plain] view
plain copy

<span style="font-size:14px;">@="cmd.exe /s /k pushd \"%V\""</span>  

运行保存好的reg文件,进行注册表导入



内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: