Add Take Ownership option to the right click menu in Win7/Vista

This trick will create a "Take Ownership" shortcut option whenever you right click a file or folder. It allows a user to assume ownership of system files or folders in Windows 7 or Vista which they would otherwise be denied access to. When you take ownership of a file or folder you replace the security permissions that were originally present with a different permission that gives you access instead.


1. Copy and Paste the following into a blank notepad 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"

2. Save the file as InstallTakeOwnership.reg
3. Doubleclick the InstallTakeOwnership.reg file to install
4. Right clicking should now give you an additional Take Ownership shortcut option.

Warning:

Messing around with the registry can be hazardous to your computers health. Don't use this trick if you worry about accidentally destroying your computer.

Reference:
http://www.howtogeek.com/howto/windows-vista/add-take-ownership-to-explorer-right-click-menu-in-vista/