Skip to main content.

Take ownership of system files

[copied from somewhere else]

You probably need to take ownership. And maybe remove the read-only setting?

Re-taking ownership: this can be achieved manually, but I prefer to add an (extended, hold shift) context menu.

I used the super useful SysInternals tool to locate my entries, F6 takes me to the registry where I can export the entries. You can copy and paste these into .reg files, save then open them to quickly add :)


Windows Registry Editor Version 5.00

@="Take &ownership"

@="cmd.exe /c takeown /f \"%1\" && icacls \"%1\" /grant administrators:F"
"IsolatedCommand"="cmd.exe /c takeown /f \"%1\" && icacls \"%1\" /grant administrators:F"


Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Directory\shell\runas] @="Take &ownership" "HasLUAShield"="" "NoWorkingDirectory"="" "Extended"=""

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


No comments yet

Add Comment

You must be logged in as a member to add comment to this blog