向Windows 10 中所有用戶的文件、文件夾和驅動器的上下文菜單中添加“獲取所有權”。通過将所有者更改為當前用戶,并授予 Owner_Rights SID(對于當前所有者)完全訪問權限,這将使您能夠立即獲得文件,文件夾(和所有内容)或驅動器(和所有内容)的所有權。
如何在 Windows 10 中将“獲取所有權”添加到上下文菜單
注意:您必須是管理員才能添加,删除和使用“獲取所有權”上下文菜單。
當您右鍵單擊或按住文件,文件夾或驅動器并單擊/輕按“獲取所有權”時,UAC 會提示您先獲得許可。
如果用戶以管理員身份登錄,則該用戶隻需單擊/輕按“是”即可批準并獲得所有權。文件,文件夾或驅動器的所有者将更改為當前用戶帳戶。将設置權限,以允許此當前所有者(Owner_Rights SID)完全控制文件,文件夾或驅動器。
如果用戶以标準用戶身份登錄,則該用戶将需要輸入所選管理員的密碼才能批準并獲得所有權。文件、文件夾或驅動器的所有者将更改為所選的管理員帳戶,而不是标準用戶。将設置權限,以允許此當前所有者(Owner_Rights SID)完全控制文件,文件夾或驅動器。
右鍵單擊或按住特定 C:驅動器,C:\Program Files 文件夾,C:\Program Files (x86)文件夾,C:\ProgramData 文件夾,C:\Users 文件夾和 C:\Window 文件夾時,“獲取所有權”上下文菜單将不可用。這是設計使然的,因為獲得 Windows“C:”驅動器的所有權以及這些特定的系統文件夾可能會使 Windows 不穩定,因為它也會同時擁有其所有内容的所有權。
您仍将能夠在上述位置内的文件和文件夾上以及除 C 驅動器和 FAT32 驅動器之外的所有其他驅動器上使用“獲取所有權”上下文菜單。
應用程序文件(例如:EXE,CMD,MSI)将具有“獲取所有權”上下文菜單,而無需替換“以管理員身份運行”。
取得 FAT32 驅動器的所有權将不起作用,并且您會得到一條錯誤消息,指出這是因為文件權限僅在 NTFS 和 ReFS 驅動器上受支持。
将“獲取所有權”添加到上下文菜單新建空白文本,複制以下代碼保存。修改 .txt 後綴為 .reg,然後雙擊導入注冊表值即可。
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
Windows Registry Editor Version 5.00
[-HKEY_CLASSES_ROOT\*\shell\TakeOwnership]
[-HKEY_CLASSES_ROOT\*\shell\runas]
[HKEY_CLASSES_ROOT\*\shell\TakeOwnership]
@="獲取所有權"
"Extended"=-
"HasLUAShield"=""
"NoWorkingDirectory"=""
"NeverDefault"=""
[HKEY_CLASSES_ROOT\*\shell\TakeOwnership\command]
@="powershell -windowstyle hidden -command "Start-Process cmd -ArgumentList '/c takeown /f \\"%1\\" && icacls \\"%1\\" /grant *S-1-3-4:F /t /c /l' -Verb runAs""
"IsolatedCommand"="powershell -windowstyle hidden -command "Start-Process cmd -ArgumentList '/c takeown /f \\"%1\\" && icacls \\"%1\\" /grant *S-1-3-4:F /t /c /l' -Verb runAs""
[HKEY_CLASSES_ROOT\Directory\shell\TakeOwnership]
@="獲取所有權"
"AppliesTo"="NOT(System.ItemPathDisplay:="C:\\Users" OR System.ItemPathDisplay:="C:\\ProgramData" OR System.ItemPathDisplay:="C:\\Windows" OR System.ItemPathDisplay:="C:\\Windows\\System32" OR System.ItemPathDisplay:="C:\\Program Files" OR System.ItemPathDisplay:="C:\\Program Files(x86)")"
"Extended"=-
"HasLUAShield"=""
"NoWorkingDirectory"=""
"Position"="middle"
[HKEY_CLASSES_ROOT\Directory\shell\TakeOwnership\command]
@="powershell -windowstyle hidden -command "Start-Process cmd -ArgumentList '/c takeown /f \\"%1\\" /r /d y && icacls \\"%1\\" /grant *S-1-3-4:F /t /c /l /q' -Verb runAs""
"IsolatedCommand"="powershell -windowstyle hidden -command "Start-Process cmd -ArgumentList '/c takeown /f \\"%1\\" /r /d y && icacls \\"%1\\" /grant *S-1-3-4:F /t /c /l /q' -Verb runAs""
[HKEY_CLASSES_ROOT\Drive\shell\runas]
@="獲取所有權"
"Extended"=-
"HasLUAShield"=""
"NoWorkingDirectory"=""
"Position"="middle"
"AppliesTo"="NOT(System.ItemPathDisplay:="C:\\")"
[HKEY_CLASSES_ROOT\Drive\shell\runas\command]
@="cmd.exe /c takeown /f "%1\\" /r /d y && icacls "%1\\" /grant *S-1-3-4:F /t /c"
"IsolatedCommand"="cmd.exe /c takeown /f "%1\\" /r /d y && icacls "%1\\" /grant *S-1-3-4:F /t /c"
新建空白文本,複制以下代碼保存。修改 .txt 後綴為 .reg,然後雙擊導入注冊表值即可。
1
2
3
4
5
6
7
8
9
Windows Registry Editor Version 5.00
[-HKEY_CLASSES_ROOT\*\shell\TakeOwnership]
[-HKEY_CLASSES_ROOT\*\shell\runas]
[-HKEY_CLASSES_ROOT\Directory\shell\TakeOwnership]
[-HKEY_CLASSES_ROOT\Drive\shell\runas]
更多精彩资讯请关注tft每日頭條,我们将持续为您更新最新资讯!