How to take ownership of files on Windows 10 with a right-click

While you'll have full control over any files or folders you create on Windows 10, certain files — like system files — are locked out. But other files, like those in other accounts or ones you might want to customize to change how Windows 10 works, are also locked out.

You can manually take ownership of these files, but if it's a thing you need to do on a regular basis so you can edit, rename, and delete as you see fit, there's an easier way that takes a bit of one-time work. With this Windows 10 guide we'll show you how to create a right-click context menu option to make it quick and easy to take ownership of a file.

How to add a 'Take Ownership' option to the right-click context menu

Important: Before you go through this guide, you should know that modifying the registry is risky, and it can cause irreversible damage to your installation if you don't do it correctly. It's recommended to make a full backup of your device before proceeding. Alternatively, you can create a system restore point, which will also help you to revert the changes you make using this guide.

To add a "Take Ownership" option to the right-click menu, do the following:

  1. Open Notepad.
  2. Copy and paste the following registry code into the text file: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"
  3. Click File.
  4. Click Save As.
  5. Under "Save as type," select All Files, and name your file anything you want with the .reg extension.
  6. Click Save.
  7. Double-click your new .reg file to merge into the registry.
  8. Click Yes.
  9. Click OK.

Once you completed the steps, you can simply right-click any file or folder, and you should now see a new "Take Ownership" item on the menu. Then simply, right-click the file or folder, right-click it and select Take Ownership.

How to remove the 'Take Ownership' option from context menu

If you no longer want to have the option available in the right-click menu, then do the following:

  1. Open Notepad.
  2. Copy and paste the following registry code into the text file:Windows Registry Editor Version 5.00[-HKEY_CLASSES_ROOT\*\shell\runas][-HKEY_CLASSES_ROOT\Directory\shell\runas]
  3. Click File.
  4. Click Save As.
  5. Under "Save as type," select All Files, and name your file anything you want with the .reg extension.
  6. Click Save.
  7. Double-click your new .reg file to merge into the registry.
  8. Click Yes.
  9. Click OK.

After you completed the steps, the option will be removed from the context menu.

More Windows 10 resources

For more help articles, coverage, and answers on Windows 10, you can visit the following resources:

Mauro Huculak

Mauro Huculak is technical writer for WindowsCentral.com. His primary focus is to write comprehensive how-tos to help users get the most out of Windows 10 and its many related technologies. He has an IT background with professional certifications from Microsoft, Cisco, and CompTIA, and he's a recognized member of the Microsoft MVP community.