Add “Take Ownership” to right-click menu in Vista

Last Update: Sep 17, 2024 | Published: Jan 06, 2009

SHARE ARTICLE

In order to streamline the ownership of various files and folders in Windows Vista, you can add the “Take Ownership” option to your right-click menu. After clicking this icon, the owner of the selected file or folder will automatically change to your username. Please note that in order to use this feature you must have administrative privileges.

Check out this article on Petri about how to modify access control lists using icacls if you don’t want to use the GUI.

Please be aware that this change requires making a change to the Windows Vista registry.
Note: Editing the registry has the potential to cause serious (and unrecoverable) damage to your PC. If you are at all uncomfortable editing the registry, please do not attempt the following.
The first step is to create a registry file. You can do this by opening Notepad (Start >> All Programs >> Accessories >> Notepad) and copying and pasting the following:

Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT*shellrunas]
@="Take Ownership"
"Extended"=""
"NoWorkingDirectory"=""
[HKEY_CLASSES_ROOT*shellrunascommand]
@="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_ROOTDirectoryshellrunas]
@="Take Ownership"
"Extended"=""
"NoWorkingDirectory"=""
[HKEY_CLASSES_ROOTDirectoryshellrunascommand]
@="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 with the name Ownership.reg and close Notepad.


Double-click your Ownership.reg file to apply it to the registry.
You will have to grant access, click Continue: (unless you Disable UAC)
this image has been lost in time
The registry editor will give you a security prompt, click Yes.
this image has been lost in time
You will be greeted with the following message from the registry editor, click Ok:
this image has been lost in time
When you hold shift and right-click on a file or folder you will have the option of changing the ownership.
this image has been lost in time
Please note that before the ownership will be changed, you must grant access, click Continue.
this image has been lost in time
In order to verify that the “Take Ownership” dialog successfully processed, you can right-click on a file, choose Properties and then choose Details and you will see the “Owner” section changed to COMPUTERNAMEUSERNAME.

SHARE ARTICLE