Top Nav

Easily Take Ownership Of Windows 7 Files and Folders [How-To]

Groovy Windows 7 Tricks, Tips, Tweaks, News, How-To, Tutorials, Comments, Questions, And AnswersWhen denied access to a file in Windows 7, one of the easiest ways around it is to Take Ownership.   This tip comes in handy when you’re dealing with stubborn system files and folders that don’t want to give you access. Normally this is a long process involving several CMD prompt lines or GUI clicks, but today I’m going to review how to quickly add the Take Ownership option to the Windows 7 right-Click context menu for the easiest 1-Click access possible

How To Add “Take Ownership” To the Windows 7 Context Menu With A Simple Registry Tweak

Step 1

Click the Windows Start Menu Orb, Type in notepad and Press Enter.

Note: Alternatively you can skip straight to Step 4 by just downloading the pre-made registry fix here

Windows 7 screenshot - open notepad

Step 2

Copy and Paste the following into the notepad document:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 
Windows Registry Editor Version 5.00 [HKEY_CLASSES_ROOT*shellrunas] @="Take Ownership" "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] @="Take Ownership" "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"

Step 3

Save the Notepad file as addownership.reg – it is very crucial that the .reg is at the end!

Windows 7 screenshot - save as addownership.reg

Step 4

Right-Click your new registry file and Select Merge.

Windows 7 screenshot - merge the registry key fix

Step 5

A warning will appear letting you know editing the registry is dangerous.  Click Yes and then close the following confirmation window.

Windows 7 screenshot - continue yes, its safe

Now when you have a file in question, you can easily just Right-Click the file or folder and Select Take Ownership.  It’s much easier than doing it the long way (which we won’t even get into.)  Once you have ownership you can move, rename, or whatever else you need to do with these otherwise inaccessible files.

Windows 7 screenshot - use right click context menu to take ownership of any file in windows 7

Note: Alternatively you can skip straight to Step 4 above if you like by  just downloading the pre-made registry fix here

More Reading:


18 Responses to Easily Take Ownership Of Windows 7 Files and Folders [How-To]

  1. RAW-BERRY March 12, 2010 at 9:35 pm #

    Very handy, thanks a ton!

  2. James May 19, 2010 at 12:07 pm #

    Just to note…. you have funky quotes enabled in your editor for this post. Not sure what that would do if someone tries to import it into the registry, but I’m guessing it would be bad. Your premade download looked good though.

    Thank you for the great post.

    • MrGroove May 19, 2010 at 2:25 pm #

      @James – Thanks for making me aware of that. Something is funky with my CSS so I “fixed” it for now. Will need to update this with a proper insert code plugin or something. Thnx again.

  3. Jill November 11, 2010 at 8:58 pm #

    Thank you so much! I jumped from XP to Win7 last week and this was annoying the snot out of me. Windows was locking my public folders in Explorer so I couldn’t move files around easily when transferring to my mp3 player. Fixed!

    • MrGroove November 12, 2010 at 9:13 am #

      @Jill Excellent! Glad we could help out! Welcome to groovyPost!

  4. Cal February 15, 2011 at 8:23 pm #

    Worked great. Thanks for the help.

  5. apteka April 14, 2011 at 7:47 pm #

    the Nordic nations of Sweden, Finland, Denmark and Norway grabbed four of the top nine spots –

  6. Shajeev June 11, 2011 at 12:42 am #

    Will this feature be applied only in the profile v create the registry entry?
    or all the users enjoy the sneak?

  7. Joe November 5, 2011 at 1:12 pm #

    it didnt work for me, i’m running windows 7 and keep getting message

    “cannot import C:\users\public\downloads\addownership.reg. the specific file is not a registry script. you can only import binary registry files from within the registry editor”

    i put the reg fix on the desktop and started it there and it goes thru the spets to that message

    Is there something i’m missing?

  8. jemile November 15, 2011 at 12:07 pm #

    i got the same as Joe

    can anyone help please ???????????

  9. wYNx January 3, 2012 at 3:39 am #

    works great!!

    cheers for this.. 🙂

  10. Gary January 25, 2012 at 7:50 pm #

    It seems like a ‘big project’ when you right clicked ‘takeownership’ on the locked file, the computer ran like mad for few minutes and in the end the name on the locked file which I intended to change still cannot be changed!!!!


  11. jewels April 22, 2012 at 6:15 am #

    same binary error msg. any idea next?

  12. Ronnie May 6, 2012 at 2:42 pm #

    A billion thanks, I tried following the required permissions route, I was like three hours and still silly padlock on the folder, now it has gone, genius work.

    I LOVE YOU!!!!!!!!!!!!!!!!!!!!!!!!! LOL

  13. Mstee November 14, 2013 at 11:22 am #

    taking ownership did not open the denied access file.

  14. Stefan Miller January 2, 2015 at 7:24 am #

    Thanks for the reg file.
    If you are using the long method (ie: not downloading the file) you must make sure that the text file is changed to .reg and not .txt so should be named


  15. Diamond INferno May 22, 2015 at 11:00 am #

    If you keep getting that error when trying to merge here is the solution!

    It worked for me so if it still doesn’t work I suggest you ask someone who knows more or search on the internet 🙂

  16. Edano Leo May 12, 2017 at 11:26 pm #

    i compared the pre made registry vs the code above. i think the reason the code above doesnt work is because all the “forward slashes” for the directory e.g. [HKEY_CLASSES_ROOT*shellrunascommand] were not present therefore won’t be regonized as a valid registry script. on top of that, you need to exclude both “ ” at the first and last part of the code since it’s a web script.

Leave a Reply


Free Learning


Don't miss a single tip, how to or tech news update. Subscribe to my free newsletter and receive updates, right to your inbox.

You have Successfully Subscribed!