Ở bài trước, mình đã hướng dẫn bạn cách Take Ownership một file, thư mục, ổ đĩa hay khóa [You must be registered and logged in to see this link.] bất kỳ sử dụng 2 công cụ có sẵn trong [You must be registered and logged in to see this link.] là [You must be registered and logged in to see this link.] và Advanced Security Settings.Tuy nhiên, sử dụng
[You must be registered and logged in to see this link.] thì buộc bạn phải nhớ những dòng lệnh và phải nhập cả đường dẫn đầy đủ của đối tượng muốn
[You must be registered and logged in to see this link.]. Còn dùng
Advanced Security Settings thì lại bắt bạn phải trải qua nhiều bước khá lằng nhằng. Do đó, ở bài này mình sẽ hướng dẫn bạn cách thêm
[You must be registered and logged in to see this link.] vào
Context menu (menu chuột phải) của đối tượng cần chiếm quyền điều khiển để bạn có thể thực hiện
Take Ownership chỉ với một click chuột.
Trước tiên, bạn bần copy đoạn code sau rồi paste vào một trình soạn thảo text nào đó (
vd: Notepad).
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 40 41 42 43 44 45
| Windows Registry Editor Version 5.00
[-HKEY_CLASSES_ROOT*shellrunas]
[HKEY_CLASSES_ROOT*shellrunas] @="Take Ownership" "Icon"="C:\Windows\System32\imageres.dll,-78" "NoWorkingDirectory"=""
[HKEY_CLASSES_ROOT*shellrunascommand] @="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_ROOTDirectoryshellrunas]
[HKEY_CLASSES_ROOTDirectoryshellrunas] @="Take Ownership" "Icon"="C:\Windows\System32\imageres.dll,-78" "NoWorkingDirectory"=""
[HKEY_CLASSES_ROOTDirectoryshellrunascommand] @="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"
[-HKEY_CLASSES_ROOTdllfileshell]
[HKEY_CLASSES_ROOTdllfileshellrunas] @="Take Ownership" "HasLUAShield"="" "NoWorkingDirectory"=""
[HKEY_CLASSES_ROOTdllfileshellrunascommand] @="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_ROOTDriveshellrunas]
[HKEY_CLASSES_ROOTDriveshellrunas] @="Take Ownership" "Icon"="C:\Windows\System32\imageres.dll,-78" "NoWorkingDirectory"=""
[HKEY_CLASSES_ROOTDriveshellrunascommand] @="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"
|
Bạn chú ý trong đoạn mã trên có 3 dòng lệnh tạo icon là:
"Icon"="C:\\Windows\\System32\\imageres.dll,-78"
bạn cần thay đổi theo phân vùng cài đặt
[You must be registered and logged in to see this link.] của mình. Ví dụ nếu bạn cài
[You must be registered and logged in to see this link.] ở ổ
D thì bạn cần thay đổi dòng lệnh trên thành:
"Icon"="D:\\Windows\\System32\\imageres.dll,-78"
Sau đó lưu lại dưới một tên bất kỳ có phần đuôi mở rộng là “
.reg”. Ở phần
Save as type bạn chọn là
All Files như hình bên dưới.
[You must be registered and logged in to see this link.]Bây giờ, bạn bấm chuột phải vào file vừa tạo chọn
Merge. Nếu xuất hiện cảnh báo
[You must be registered and logged in to see this link.] bạn chọn
Yes. Một hộp thoại xác nhận xuất hiện và bạn tiếp tục bấm
Yes rồi
OK.
[You must be registered and logged in to see this link.]Bây giờ trong menu chuột phải bạn sẽ thấy xuất hiện thêm mục
[You must be registered and logged in to see this link.] giúp bạn chiếm quyền điều khiển một cách nhanh chóng.
Nếu bạn muốn xóa bỏ
[You must be registered and logged in to see this link.] khỏi
Context menu, bạn copy đoạn mã sau:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
| Windows Registry Editor Version 5.00
[-HKEY_CLASSES_ROOT*shellrunas]
[-HKEY_CLASSES_ROOTDirectoryshellrunas]
[-HKEY_CLASSES_ROOTdllfileshell]
[-HKEY_CLASSES_ROOTDriveshellrunas]
[-HKEY_CLASSES_ROOTexefileshellrunas]
[HKEY_CLASSES_ROOTexefileshellrunas] "HasLUAShield"=""
[HKEY_CLASSES_ROOTexefileshellrunascommand] @=""%1\" %*" "IsolatedCommand"=""%1\" %*"
|
rồi cũng làm theo các bước trên.
Chúc bạn thành công!