Skip to main content

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 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.

19 Comments
  • Thanks, Mauro, this is a nice demonstration of the extensibility of Explorer (and in particular, how you might want to add other options that perform other tasks on a particular file or folder). However, considering how seldom in practice one needs to take ownership of a folder, this seems a little overkill for this particular purpose. Perhaps using xcacls to reset all permissions on a folder and inherit from the parent would be a slightly more common use (if you manually change permissions a lot). Or perhaps to encrypt something using an obscure commandline tool, or run some commandline image fix utility on an entire folder full of images. Or if you want to know how to undo the additions that some software makes to your context menu that you never use and want to remove, this is also useful to point people in the right direction.
  • how to avoid MS reducing windows to a tic tac toe 8bit game ??
  • There is an inherent problem with posting stuff like this on an open blog like this. You invite people to try things they have no business trying. This is for advanced users who have knowledge of what they are doing.
    They will know where to find this, this should NOT have been posted here This is not for the average joe to be using. You can break Windows very easily with this.
  • I have to agree, this is for pros who know exactly what they are doing
  • Agree. Most people run the risk of breaking things if they start changing permissions
  • Agree. Most people run the risk of breaking things if they start changing permissions
  • I disagree. Average Joes will not bother. People interested in tweeking systems will. I wish there was more of this stuff available like this. Back in the 80's and 90's Byte and PCmag routinely offered columns like this.
  • You would be surprised as to what people will try.
    This informatioin and much more are located on a particular Forums Site for Windows 10 and aptly named, but won't post the url here There are plenty of other locations to gain tweaks etc. Bt this information is actually dangerous for majority of users.
  • This can be very dangerous if the average user tried to do this. However, I think given this is their own machine they are trying this on, and the average user doesnt come to Windows Central, the idea of posting this here isnt bad. A lot of IT pros/people who work with this stuff every day like to see this stuff and can help them out :).
  • Does this prevent windows from launching the important choice (foreground window bought forward, all others darkened) feature? For example, anytime I launch MSI Afterburner, I have run the program twice (glitch where it won't run the first time) and the important choice window has to pop up twice. I'd love for it to be recognized as a "safe" file.
  • Is anyone actually vetting this guys articles before he posts? He seems hell bent on damaging peoples windows installations
    Do NOT do this unless you know exactly what you're doing. File ownership and DACLs are one of the core security measures on your OS, and taking ownership of any files is not recommended.
  • For the less-technical amongst us, you can download the registry scripts from here. I have used them for years on most (recent) versions of Windows, including 10 with AU. http://www.howtogeek.com/howto/windows-vista/add-take-ownership-to-explorer-right-click-menu-in-vista/    
  • All your file are belong us.
  • Great thanks mate
  • Just wait till we get a UWP File explorer (which will more than likely be a lazy W10M port, just like OneDrive) and all these advanced features, along with very basic ones will be gone... I'll miss Win32.
  • I WISH I would have had this trick when I installed my SSD and reinstalled a clean copy. I was locked out of ALL my files on my 3TB backup drive and it was a nightmare!
  • Well, taking ownership of files has always been there. This is just a way to make it more convenient if you do this sort of thing often (I honestly cannot think of a scenario where that might be the case, but I digress). The "normal" way to do this in the GUI would be to right click the file / folder and select Properties, then go to the Security tab, click Advanced, and next to the Owner, click Change... All that this shortcut does is run the command line utility "takeown" and prefill all the arguments so you don't need to remember the command.
  • Wow, there are some real nannies here. Yes, there is risk to mucking around with this stuff, but guess what? Mauro cautions the reader and very helpfully links to instructions on backing up your machine or creating a restore point. That said, Jessicator had some really excellent (and polite) points. Using xcacls for average uses (and users) is going to be overkill. I remember the first time I learned about this little utility.  Such power, such responsibility. Wow.  Of course, it was just "cacles.exe" back then. Our PCs were powered by coal and little dinosaurs that ran on little treadmills. Maybe WindowsCentral should have an "Experts or Risk-Takers Only" section. Then the comments that get posted would actually be helpful. (not saying mine is helpful either. haha)
  • For me I've had people edit the registry and screw their machine over, so it's not that people shouldn't do it but rather using caution when editing it.