右鍵管理員身份打開 命令行cmd
- 2019 年 10 月 10 日
- 筆記
添加到註冊表 將下面命令保存為reg文件:
Windows Registry Editor Version 5.00
[-HKEY_CLASSES_ROOTDirectoryshellrunas]
[HKEY_CLASSES_ROOTDirectoryshellrunas] @="Open command window here as Administrator" "HasLUAShield"=""
[HKEY_CLASSES_ROOTDirectoryshellrunascommand] @="cmd.exe /s /k pushd "%V""
[-HKEY_CLASSES_ROOTDirectoryBackgroundshellrunas]
[HKEY_CLASSES_ROOTDirectoryBackgroundshellrunas] @="Open command window here as Administrator" "HasLUAShield"=""
[HKEY_CLASSES_ROOTDirectoryBackgroundshellrunascommand] @="cmd.exe /s /k pushd "%V""
[-HKEY_CLASSES_ROOTDriveshellrunas]
[HKEY_CLASSES_ROOTDriveshellrunas] @="Open command window here as Administrator" "HasLUAShield"=""
[HKEY_CLASSES_ROOTDriveshellrunascommand] @="cmd.exe /s /k pushd "%V""
[-HKEY_CLASSES_ROOTLibraryFolderbackgroundshellrunas]
[HKEY_CLASSES_ROOTLibraryFolderbackgroundshellrunas] "HasLUAShield"="" @="Open command window here as Administrator"
[HKEY_CLASSES_ROOTLibraryFolderbackgroundshellrunascommand] 保存 文件名為 Add_Open_Command_Window_Here_as_Administrator.reg 然後雙擊執行就可以了。
卸載 類似上面的,執行下面註冊表命令就可以了:
Windows Registry Editor Version 5.00
[-HKEY_CLASSES_ROOTDirectoryshellrunas]
[-HKEY_CLASSES_ROOTDirectoryBackgroundshellrunas]
[-HKEY_CLASSES_ROOTDriveshellrunas]
[-HKEY_CLASSES_ROOTLibraryFolderbackgroundshellrunas] ~