Take Ownership of File or Folder via Right-click Context Menu in Windows

We saw how to Take Ownership of a file or folder using the takeown.exe command-line tool. You can add “Take Ownership” command to the right-click menu for much easier access.

Download take_ownership_context_menu.zip, unzip and run the enclosed REG file.

Contents of the REG file

Windows Registry Editor Version 5.00

;Add Take Ownership command to the context menu
;Take ownership of a file/folder, and provide "Administrators" group Full Control permissions.
;For Windows Vista, 7, 8, 8.1 and Windows 10

[-HKEY_CLASSES_ROOT\*\shell\runas]

[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"

[-HKEY_CLASSES_ROOT\Directory\shell\runas]

[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"

take ownership right-click menu





That’s it. It’s much easier now to take ownership of a file or folder without manually opening the Command Prompt window every time.

About the author

Ramesh Srinivasan founded Winhelponline.com back in 2005. He is passionate about Microsoft technologies and has a vast experience in the ITeS industry — delivering support for Microsoft's consumer products. He has been a Microsoft MVP [2003 to 2012] who contributes to various Windows support forums.

Leave a Comment