Pinterest Stumbleupon Whatsapp
Advertisement

Have you ever tried to open a file or folder on your computer and received an “Access Denied” error Windows File System Woes: Why Do I Get Access Denied? Windows File System Woes: Why Do I Get Access Denied? Ever wonder why you might get an "Access Denied" error message in Windows? It might have something to do with your file-system permissions. Read More ? Even if you’re the only user on your PC, this error still pops up at times and is frustrating to deal with. Taking ownership of the file in question solves the issue, but takes a few steps to reach. You can make it easier by adding a shortcut on your right-click menu for easy access.

This involves editing the Registry, which can damage your system if you’re not careful How Not to Accidentally Mess Up the Windows Registry How Not to Accidentally Mess Up the Windows Registry Working with the Windows registry? Take note of these tips, and you'll be much less likely to do lasting damage to your PC. Read More . Since it involves several steps and different locations, it’s easier to run a quick REG file to add the changes instead of making them yourself. First, open a Notepad window and paste this into it:

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"

Then go to File > Save As. Select All Files as the file type, and name it TakeOwnership.reg. The exact name isn’t important, but it must end in .reg. After you save this file to somewhere convenient, just double-click it and accept the warnings to add the Take Ownership entry to your menu. Right-click on most files or folders and you’ll see a new entry near the top of the list for taking ownership.

If you want to remove the shortcut later, just perform the same operation with this Registry code:

Windows Registry Editor Version 5.00

[-HKEY_CLASSES_ROOT\*\shell\runas]

[-HKEY_CLASSES_ROOT\Directory\shell\runas]

Want more handy shortcuts like this? Check out other great entries you can add to your right-click menu How to Add & Remove Entries from the Windows Right-Click Menu How to Add & Remove Entries from the Windows Right-Click Menu Everyone loves shortcuts. Meanwhile, your context menu is cluttered with entries you never touch. We'll show you how to customize the right-click menu with shortcuts you'll actually want to use. Read More .

Have you added this shortcut for easy access or do you not need it? When was the last time you had to take ownership of a file? Let us know down in the comments!

Advertisement

Image Credit: Thinglass via Shutterstock

Leave a Reply

Your email address will not be published. Required fields are marked *

  1. Antonio Brown
    September 15, 2017 at 5:45 am

    Thanks for sharing!