Taking ownership of Windows files

Registry ‘hack’ for taking ownership of Windows files. A simpler work-around for the usually cumbersome series of steps you normally otherwise have to take to achieve the same results: Copy and paste the following script into notepad and save the file with a .reg extension. (for example, TakeOwnership.reg) You will then be able to double-click on the file and have the registry auto-updated with the necessary settings.

You’ll most likely get a prompt asking “Adding information can unintentionally change or delete values…blah blah blah…etc, …Are you sure you want to continue”. Just click ‘Yes’ if you’re sure you want the ‘Take Ownership’ feature installed.

This is the menu option (highlighted in yellow) that this registry update will add to your right-click context menu in Windows Explorer:

Copy Code below:

@=”Take Ownership”
@=”cmd.exe /c takeown /f \”%1\” && icacls \”%1\” /grant administrators:F”
“IsolatedCommand”=”cmd.exe /c takeown /f \”%1\” && icacls \”%1\” /grant administrators:F”
@=”Take Ownership”
@=”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”