Subscribe to groovyPost.com

Share

Groovy Windows 7 Tricks, Tips, Tweaks, News, How-To, Tutorials, Comments, Questions, And AnswersWhen you’re denied access to a file in Windows 7 one of the easiest ways around it is to just Take Ownership.   This comes in handy when you’re dealing with stubborn system files and folders that don’t want to let you in.  Normally this is a long process involving several CMD prompt lines or GUI clicks so today I’m going to review how to easily 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 (excluding the [code] [/code])

[code]
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"
[/code]

Step 3

Save the Notepad file as addownership.reg – it is very important 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 in to).  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 by just downloading the pre-made registry fix here

Email Updates

Just enter your Email Address Below to Receive our Groovy How-To Tutorials Daily, Free and Easy:


Related Articles


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

  1. RAW-BERRY says:

    Very handy, thanks a ton!

  2. James says:

    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 says:

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

Leave a Reply

For faster support, please post technical questions in our Community Forum, not the comments.