企业🤖AI Agent构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
[TOC] > [参考](https://www.sevenforums.com/tutorials/47415-open-command-window-here-administrator.html) ## 创建运行管理员菜单 <details> <summary>cmd.reg</summary> ``` Windows Registry Editor Version 5.00 ; Created by: Shawn Brink ; http://www.sevenforums.com ; Tutorial: http://www.sevenforums.com/tutorials/47415-open-command-window-here-administrator.html [-HKEY_CLASSES_ROOT\Directory\shell\runas] [HKEY_CLASSES_ROOT\Directory\shell\runas] @="Open command window here as Administrator" "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 command window here as Administrator" "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 command window here as Administrator" "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] "HasLUAShield"="" @="Open command window here as Administrator" [HKEY_CLASSES_ROOT\LibraryFolder\background\shell\runas\command] @="cmd.exe /s /k pushd \"%V\"" ``` </details> <br/> 运行`cmd.reg` ## 取消菜单 <details> <summary>remove.reg</summary> ``` Windows Registry Editor Version 5.00 ; Created by: Shawn Brink ; http://www.sevenforums.com ; Tutorial: http://www.sevenforums.com/tutorials/47415-open-command-window-here-administrator.html [-HKEY_CLASSES_ROOT\Directory\shell\runas] [-HKEY_CLASSES_ROOT\Directory\Background\shell\runas] [-HKEY_CLASSES_ROOT\Drive\shell\runas] [-HKEY_CLASSES_ROOT\LibraryFolder\background\shell\runas] ``` </details> <br/> 运行 `remove.reg`