Windows 7 - Add the Take Ownership option to context menu

March 2017


To add the " Take Ownership" option to the context menu ( Right-click):
  • Open Notepad and paste the following code:


Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\*\shell\runas]
@="Take Ownership"
"Extended"=""
"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"
"Extended"=""
"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"
  • Click on File> Save As > TakeOwnership.reg
  • Double click on the new .reg file created and confirm the changes that will be made in the registry.
  • To access the "Take Ownership" option, simply press and hold the Shift key while right-clicking on the folder or file of your choice.

Related


Published by deri58.
This document, titled "Windows 7 - Add the Take Ownership option to context menu," is available under the Creative Commons license. Any copy, reuse, or modification of the content should be sufficiently credited to CCM (ccm.net).