Add Take Ownership Option to Windows Explorer

Last Updated on

Everyone now and again there is a directory that you wish gone and it prefers to stay put….poking around with security dialog boxes in windows can accomplish this task; however, that can all be negated with this modification which adds a “take ownership” option to your explorer context menu for folders.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
[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"

 Download Registry File

Lima

About the author

Lima is the visual nautical indicator for "stop instantly."

Leave a Reply