If you have to take ownership of a file or folder in Windows Vista, then you have to go through many steps. But you can add the whole series commands to the right-click context menu so that you can just right-click on a file or folder and choose Take Ownership to take the ownership of the selected item. Here is how :
- Press the keyboard shortcut Windows logo key + R to open the Run dialog. In the Run dialog, type regedit and press Enter. This will open the Windows Registry Editor.
- In the Windows Registry Editor, navigate to the following key :
HKEY_CLASSES_ROOT*shell
- Right-click on shell key and select New → Key to create a sub-key. Put the name of the key ownership. Change the default value of the newly created key to Take Ownership.
- Now right-click on ownership key and select New → Key to create a sub-key. Put the name of the key command. Change the default value of the newly created key to :
cmd.exe /c icacls “%1” /setowner Administrators && icacls “%1” /grant Administrators:F
- We just finished added right-click menu for all files. Now we will add right-click menu to all the folders. In the Windows Registry Editor, navigate to the following key :
HKEY_CLASSES_ROOTDirectoryshell
- Right-click on shell key and select New → Key to create a sub-key. Put the name of the key ownership. Change the default value of the newly created key to Take Ownership.
- Now right-click on ownership key and select New → Key to create a sub-key. Put the name of the key command. Change the default value of the newly created key to :
cmd.exe /c icacls “%1” /setowner Administrators && icacls “%1” /grant Administrators:F /T
Alternatively, you can download the ready made Registry Entries file take_ownership.zip. Download the ZIP file and extract the contents to your desktop. Then double-click on the add_take_ownership.reg. Choose Yes when asked.