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

Windows 7 資料夾提示「您目前無權存取此資料夾」解決法:右鍵選單加入「取得管理員權限」

編輯:Win7 常見問題解答

重裝系統後存取舊資料夾出現「您目前無權存取此資料夾」,因 NTFS 權限中原擁有者 SID 已不存在。透過登錄加入右鍵選單「管理員取得所有權」,一鍵修正權限繼承與擁有者。

建立右鍵修復選單

  1. 記事本貼上以下內容,存為 TakeOwnership.reg(編碼 ANSI/UTF-8)。
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\*\shell\runas]
@="管理員取得所有權"
"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]
@="管理員取得所有權"
"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]
@="管理員取得所有權"
"NoWorkingDirectory"=""
  1. 雙擊 TakeOwnership.reg → 「是」匯入登錄。
  2. 右鍵任何檔案/資料夾 → 選擇「管理員取得所有權」→ 彈出 CMD 視窗執行 takeown + icacls → 完成後即可正常存取。

原理說明

  • takeown /f \"%1\":將目前管理員設為檔案/資料夾擁有者。
  • icacls \"%1\" /grant administrators:F:授予 Administrators 群組完整控制權 (F)。
  • 遞迴處理子資料夾/檔案,徹底解決權限阻擋。

注意

  • 需管理員權限執行,標準使用者無效。
  • 系統關鍵資料夾(Windows、Program Files)謹慎操作,避免破壞系統完整性。
  • 若右鍵選單未出現,重新登入或重開機刷新殼層快取。
Copyright © Windows教程網 All Rights Reserved