Windows XP Windows 7 Windows 2003 Windows Vista Windows 綜合教學 Linux 系統教學
Windows 10 Windows 8 Windows 2008 Windows NT Windows Server 電腦軟體教學

Windows 8 取得超級管理員權限完整教學:右鍵選單快速添加「管理員權限」

編輯:Windows 8 系統介紹

前言:為什麼需要超級管理員權限?

在 Windows 8 中存取系統資料夾(如 C 槽內的系統目錄)時,常會遇到「無法存取」或「拒絕存取」的提示。這是因為預設帳戶沒有超級管理員權限。雖然 Windows 7 可透過各種工具在右鍵選單添加「取得管理員權限」按鈕,但 Windows 8 同樣可以通過匯入登錄檔輕鬆實現。

操作步驟

  1. 新建一個記事本,將下方的登錄碼複製進去,存檔時將副檔名改為 .reg(檔名任意)。
  2. 雙擊該 .reg 檔案匯入登錄表,出現提示時點選「是」。
  3. 匯入完成後,對著想取得權限的資料夾按右鍵,選單中會出現「管理員權限」與「恢復原始權限」兩個選項。
  4. 操作完成後,建議選擇「恢復原始權限」以確保系統安全。

登錄碼內容

取得管理員權限

Windows Registry Editor Version 5.00

;取得檔案修改權限
[HKEY_CLASSES_ROOT\*\shell\runas]
@="管理員權限"
"Icon"="C:\\Windows\\System32\\imageres.dll,102"
"NoWorkingDirectory"=""

[HKEY_CLASSES_ROOT\*\shell\runas\command]
@="cmd.exe /c takeown /f \"%1\" && icacls \"%1\" /grant administrators:F"
"IsolatedCommand"="cmd.exe /c takeown /f \"%1\" && icacls \"%1\" /grant administrators:F"

[HKEY_CLASSES_ROOT\exefile\shell\runas2]
@="管理員權限"
"Icon"="C:\\Windows\\System32\\imageres.dll,102"
"NoWorkingDirectory"=""

[HKEY_CLASSES_ROOT\exefile\shell\runas2\command]
@="cmd.exe /c takeown /f \"%1\" && icacls \"%1\" /grant administrators:F"
"IsolatedCommand"="cmd.exe /c takeown /f \"%1\" && icacls \"%1\" /grant administrators:F"

[HKEY_CLASSES_ROOT\Directory\shell\runas]
@="管理員權限"
"Icon"="C:\\Windows\\System32\\imageres.dll,102"
"NoWorkingDirectory"=""

[HKEY_CLASSES_ROOT\Directory\shell\runas\command]
@="cmd.exe /c takeown /f \"%1\" /r /d y && icacls \"%1\" /grant administrators:F /t"
"IsolatedCommand"="cmd.exe /c takeown /f \"%1\" /r /d y && icacls \"%1\" /grant administrators:F /t"

恢復原始權限

Windows Registry Editor Version 5.00

;恢復原始權限
[HKEY_CLASSES_ROOT\*\shell\runas-]
@="恢復原始權限"
"Icon"="C:\\Windows\\System32\\imageres.dll,101"
"NoWorkingDirectory"=""

[HKEY_CLASSES_ROOT\*\shell\runas-\command]
@="cmd.exe /c takeown /f \"%1\" && icacls \"%1\" /reset && cacls \"%1\" /e /r \"%%USERNAME%%\""
"IsolatedCommand"="cmd.exe /c takeown /f \"%1\" && icacls \"%1\" /reset && cacls \"%1\" /e /r \"%%USERNAME%%\""

[HKEY_CLASSES_ROOT\exefile\shell\runas2-]
@="恢復原始權限"
"Icon"="C:\\Windows\\System32\\imageres.dll,101"
"NoWorkingDirectory"=""

[HKEY_CLASSES_ROOT\exefile\shell\runas2-\command]
@="cmd.exe /c takeown /f \"%1\" && icacls \"%1\" /reset && cacls \"%1\" /e /r \"%%USERNAME%%\""
"IsolatedCommand"="cmd.exe /c takeown /f \"%1\" && icacls \"%1\" /reset && cacls \"%1\" /e /r \"%%USERNAME%%\""

[HKEY_CLASSES_ROOT\Directory\shell\runas-]
@="恢復原始權限"
"Icon"="C:\\Windows\\System32\\imageres.dll,101"
"NoWorkingDirectory"=""

[HKEY_CLASSES_ROOT\Directory\shell\runas-\command]
@="cmd.exe /c takeown /f \"%1\" /r /d y && icacls \"%1\" /reset && cacls \"%1\" /e /r \"%%USERNAME%%\""
"IsolatedCommand"="cmd.exe /c takeown /f \"%1\" /r /d y && icacls \"%1\" /reset && cacls \"%1\" /e /r \"%%USERNAME%%\""

提示:若想移除這兩個右鍵選單項目,可手動刪除對應的登錄鍵值,或編寫批次檔自動化清理。

Copyright © Windows教程網 All Rights Reserved