How to Add Take Ownership to File Explorer Context Menu

Taking ownership of files or folders in Windows is not simple. Why not add a simple context menu command that lets you take ownership of any file or folder?

How to Add Take Ownership to File Explorer Context Menu 3IeAQLD

You can add a quick link to taking ownership of files by copying the following text into a blank notepad file, and saving that file with a .reg extension.

Code:

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"



1. Click/tap the registry file (.reg) to merge it with registry.

2. If prompted, click on Run, Yes (UAC), Yes, and OK to approve the merge.

3.  You can now delete the registry file if you like.

4. You might need to restart your computer.