zoukankan      html  css  js  c++  java
  • win10右键添加控制台

    Windows Registry Editor Version 5.00
     
    ; 原文链接:
    ; https://blog.csdn.net/cxrsdn/article/details/84538767
     
    ; 若原先有,先删除原来的
    [-HKEY_CLASSES_ROOTDirectoryBackgroundshellOpenCmdHere]
    [-HKEY_CLASSES_ROOTDirectoryBackgroundshell
    unas]
    [-HKEY_CLASSES_ROOTDirectoryBackgroundshellPowershellAdmin]
     
    ; 1.右键:命令行
    [HKEY_CLASSES_ROOTDirectoryBackgroundshellOpenCmdHere]
    @="在此处打开命令行窗口"
     
    [HKEY_CLASSES_ROOTDirectoryBackgroundshellOpenCmdHerecommand]
    @="cmd.exe -noexit -command Set-Location -literalPath "%V"" 
     
    ; 2.右键:命令行(管理员)
    [HKEY_CLASSES_ROOTDirectoryBackgroundshell
    unas]
    @="在此处打开命令行窗口(管理员)"
    "ShowBasedOnVelocityId"=dword:00639bc8
     
    [HKEY_CLASSES_ROOTDirectoryBackgroundshell
    unascommand]
    @="cmd.exe /s /k pushd "%V""
     
    ; 3.shift+右键:Powershell(管理员)
    [HKEY_CLASSES_ROOTDirectoryBackgroundshellPowershellAdmin]
    @="在此处打开 Powershell 窗口(管理员)"
    "Extended"=""
     
    [HKEY_CLASSES_ROOTDirectoryBackgroundshellPowershellAdmincommand]
    @=""C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -windowstyle hidden -Command $stpath = pwd; Start-Process PowerShell -ArgumentList \"-NoExit\", \"-Command Set-Location -literalPath '%V'\" -verb RunAs"
     
    ; 4.设置右键 管理员打开cmd的另一种方法(可用来替换上面的2)
    ; 通过Powershell调起,会闪过一次Powershell的窗口,去掉下面几行的[; ]可以取消注释
    ; [-HKEY_CLASSES_ROOTDirectoryBackgroundshellOpenCmdHereAdmin]
    ; 
    ; [HKEY_CLASSES_ROOTDirectoryBackgroundshellOpenCmdHereAdmin]
    ; @="在此处打开命令行窗口(管理员)"
    ; 
    ; [HKEY_CLASSES_ROOTDirectoryBackgroundshellOpenCmdHereAdmincommand]
    ; @="PowerShell -windowstyle hidden -Command "Start-Process cmd.exe -ArgumentList '/s,/k, pushd,%V' -Verb RunAs""

    虽然win10 shift右键有控制台,但是不很方便,将以上内容保存为reg文件(带bom)不然会乱码,双击运行即可。

  • 相关阅读:
    Http option 请求是怎么回事
    Azure中配置和发布 Nginx docker到互联网
    Antdesign Form 实现页面控件的赋值加载
    windows下搭建spark+python 开发环境
    Python 使用有道翻译
    Docker安装
    Servlet使用注解配置URl提示404错误
    PowerShell自定义函数定义及调用
    使用代理实现对C# list distinct操作
    Asp.net 按钮幕布遮盖效果实现方式
  • 原文地址:https://www.cnblogs.com/zhaogaojian/p/12350230.html
Copyright © 2011-2022 走看看