新建一個txt文檔,將以下內容複製進去,然後將文檔後綴名改爲.reg,雙擊運行.reg文件。
(也可以直接下載我寫好的文件)
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]
@="openCMD" #名稱隨意,此三處最好一致
"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]
@="openCMD" #同上,此三處最好一致
"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]
@="openCMD" #同上,此三處最好一致
"HasLUAShield"=""
[HKEY_CLASSES_ROOT\Drive\shell\runas\command]
@="cmd.exe /s /k pushd \"%V\""
任意打開一個文件夾,單擊右鍵,菜單中就有“以管理員身份運行”這一項了。