Win10设置shift+右键以管理员方式打开cmd


1.首先打开注册表

  • Win + R
  • 输入regedit,回车

2.找到路径
HKEY_CLASSES_ROOT\Directory\shell\OpenCmd\command(可以直接复制粘贴到注册表编辑器上面的地址栏)

3.新建项
在shell目录下新建一个名为OpenCmd的项

再在OpenCmd目录下新建一个名为command的项

4.更改值
新建一个DWORD32类型叫ShowBasedOnVelocityId的项目,填入值639bc8


在command里面,右键"默认",填入cmd.exe /s /k pushd "%V"

5.通过编写.reg文件的方式
新建一个记事本,输入以下代码,然后将后缀改为reg,双击运行,即可。

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Directory\Background\shell\OpenCmdHere]
@="在此处打开命令行窗口"
"Extended"=""
"NoaWorkingDirectory"=""

[HKEY_CLASSES_ROOT\Directory\Background\shell\OpenCmdHere\command]
@="PowerShell -windowstyle hidden -Command \"Start-Process cmd.exe -ArgumentList '/s,/k, pushd,%V' -Verb RunAs\""

6.结语
然后就可以找个地方右键试试看了。

7.参考
https://blog.csdn.net/hiudawn/article/details/80701935
https://blog.csdn.net/qq_31475993/article/details/107962270
https://blog.csdn.net/cxrsdn/article/details/84538767


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM