How To Take Ownership of Files in Vista


Taking ownership of system files and folders in Vista is a pain. You can use the command line or the GUI, but you will tire after a while because there are simply too many steps. Here’s a way that will add this option to the context menu, so all you need to do to take ownership is to right-click and select the option. This will make it so simple as you can change permissions of a file from the context menu. To do this :

 

Open Notepad and type in the following..

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”

 

Save the file as takeown.reg.

 

Double-click on the file and click Yes when prompted. There’s no need to reboot. Thats it and You are done.

Comments

Leave a Reply to Marko