Giới thiệu

Thường thì người dùng phải có quyền làm chủ một tập tin trên hệ điều hành thì mới có thể chỉnh sửa, đổi tên hoặc xóa tập tin được bảo vệ trên hệ điều hành.

Tuy nhiên trên Windows việc làm chủ một tập tin hoặc thư mục không dễ dàng. Nếu như trước đây có thể sử dụng Command Prompt thì giờ đây trên Windows 10 không thể thực hiện được.

Trên Windows 10, nếu bạn không thể bật được Admin để truy cập quyền sử dụng cao nhất thì cách thêm Take Ownership chính là giải pháp giúp bạn.

Để thêm tùy chọn Take ownership vào menu chuột phải trên Windows 10, bạn phải thực hiện một số tinh chỉnh trên Windows Registry.

Thêm Take Ownership vào menu ngữ cảnh

Bước 1: Tạo một file notepad mới

Bước 2: Paste đoạn code sau

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\*\shell\runas]
@="Take Ownership"
"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\Directory\shell\runas]
@="Take Ownership"
"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"

Bước 3: lưu và đặt tên thành InstallTakeOwnership.reg (phần mở rộng chọn tất cả)

Bước 4: chuột phải chọn Merge

Sẽ có một thông báo xác nhận, ấn Yes

Tiếp đó là 1 thông báo thành công, bạn ấn OK.

Bước 5: Để thử xem Take Ownership đã thực hiện được chưa, bạn click chuột phải vào file bất kỳ sẽ thấy có menu Take Ownership hiện ra nhé.

add take ownership vao menu chuot phai windows 10

Gỡ bỏ Take Ownership khỏi menu ngữ cảnh

Làm tương tự các bước trên, đoạn code như sau:

Windows Registry Editor Version 5.00


[-HKEY_CLASSES_ROOT\*\shell\runas]

[-HKEY_CLASSES_ROOT\Directory\shell\runas]

Các bạn đặt tên file là RemoveTakeOwnership.regMerge là được nhé.

Leave a Reply

This site uses cookies to offer you a better browsing experience. By browsing this website, you agree to our use of cookies.