How to Add "Take Ownership" to the Context Menu for Files and Folders in Windows
Windows users often need full access to certain files and folders, especially if they’re system-protected or created by another user. Adding a "Take Ownership" option to the context menu lets you quickly change the ownership of an object and gain full access. In this guide, we’ll show you how to add this feature without diving into complex settings.
Warning
Changing the ownership of system files can cause instability in the operating system. Use this feature carefully and only when absolutely necessary.
Instructions for Adding the "Take Ownership" Option to the Context Menu
Step 1: Open Notepad and Create a Registry File
First, we need to create a special registry file (.reg) that will add the necessary keys and values to the Windows registry. This can be done using Notepad.
- Open Notepad (you can find it via Windows search).
- Copy and paste the following text into Notepad:
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\*\shell\takeownership]
@="Take Ownership"
"icon"="imageres.dll,-529"
[HKEY_CLASSES_ROOT\*\shell\takeownership\command]
@="cmd.exe /c takeown /f \"%1\" && icacls \"%1\" /grant administrators:F"
[HKEY_CLASSES_ROOT\Directory\shell\takeownership]
@="Take Ownership"
"icon"="imageres.dll,-529"
[HKEY_CLASSES_ROOT\Directory\shell\takeownership\command]
@="cmd.exe /c takeown /f \"%1\" /r /d y && icacls \"%1\" /grant administrators:F /t"
Step 2: Save the File
Save the file with any name, but be sure to use the .reg extension. For example, you could name it TakeOwnership.reg
. Be sure to select "All Files" as the file type in Notepad to avoid saving it with a .txt extension.
Step 3: Run the Registry File
- Double-click on the saved
TakeOwnership.reg
file. - A confirmation prompt will appear. Click "Yes" to make changes to the registry.
How to Use the "Take Ownership" Feature
Now that you’ve added the feature to the context menu, right-click on any file or folder you wish to access. In the context menu, select "Take Ownership." The system will automatically change the owner of the object to your administrator account.
How to Remove the "Take Ownership" Feature from the Context Menu
If you’d like to remove this option from the context menu, you’ll need to delete the added registry keys. Here’s how:
- Open the Registry Editor (type
regedit
in the Windows search and press Enter). - Navigate to the following sections:
HKEY_CLASSES_ROOT\*\shell\takeownership
HKEY_CLASSES_ROOT\Directory\shell\takeownership
- Delete the
takeownership
keys in each section.