Take Ownership of File or Folder via Right-click Menu

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

Add “Take Ownership” to the right-click menu

Download take_ownership_context_menu.zip, unzip the file, and run the enclosed REG file. Click Yes to confirm.

This adds the “Take Ownership” command to the right-click menu for files and folders.

To access the menu item, press Shift and right-click on a file or folder. Click “Take ownership”. For folders, the command takes ownership and assigns permissions recursively (i.e., for the current folder, files, subfolders, and all files in the subfolders.)

take ownership right-click menu



After the command completes execution, you can see the results in the Command Prompt window.

take ownership - success - check status


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, 10 and Windows 11.

[-HKEY_CLASSES_ROOT\*\shell\runas]

[HKEY_CLASSES_ROOT\*\shell\runas]
@="Take Ownership"
"Extended"=""
"HasLUAShield"=""
"NoWorkingDirectory"=""

[HKEY_CLASSES_ROOT\*\shell\runas\command]
@="cmd.exe /k takeown /f \"%1\" && icacls \"%1\" /grant *S-1-5-32-544:F"

[-HKEY_CLASSES_ROOT\Directory\shell\runas]

[HKEY_CLASSES_ROOT\Directory\shell\runas]
@="Take Ownership"
"Extended"=""
"HasLUAShield"=""
"NoWorkingDirectory"=""
"AppliesTo"="NOT (System.ItemPathDisplay:=\"C:\\Users\" OR System.ItemPathDisplay:=\"C:\\ProgramData\" OR System.ItemPathDisplay:=\"C:\\Windows\" OR System.ItemPathDisplay:=\"C:\\Windows\\System32\" OR System.ItemPathDisplay:=\"C:\\Program Files\" OR System.ItemPathDisplay:=\"C:\\Program Files (x86)\")"

[HKEY_CLASSES_ROOT\Directory\shell\runas\command]
@="cmd.exe /k takeown /f \"%1\" /r /d y && icacls \"%1\" /grant *S-1-5-32-544:F /t /c"

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


One small request: If you liked this post, please share this?

One "tiny" share from you would seriously help a lot with the growth of this blog. Some great suggestions:
  • Pin it!
  • Share it to your favorite blog + Facebook, Reddit
  • Tweet it!
So thank you so much for your support. It won't take more than 10 seconds of your time. The share buttons are right below. :)

Ramesh Srinivasan is passionate about Microsoft technologies and he has been a consecutive ten-time recipient of the Microsoft Most Valuable Professional award in the Windows Shell/Desktop Experience category, from 2003 to 2012. He loves to troubleshoot and write about Windows. Ramesh founded Winhelponline.com in 2005.

Leave a Comment