Add Take Ownership Context Menu in Windows 10

Sometimes you need to get full access to some file or folder in Windows 10. It can be a system file or folder, or one which was created by a user account that no longer exists. In most cases, the Windows operating system will prevent you from doing any operation on such files and folders. By adding a special context menu, you can quickly get full access to the files and folders.

Take Ownerhship Context Menu

NTFS is the standard file system of the Windows NT operating system family. Starting with Windows NT 4.0 Service Pack 6, it supported the concept of permissions which can be configured to permit or restrict access to files, folders, and other objects locally and over a network.

By default, almost all system files, system folders and even Registry keys in Windows 10 are owned by a special built-in user account called "TrustedInstaller". Other user accounts are set to only read the files.

As a user accesses each file, folder, registry key, printer, or an Active Directory object, the system checks its permissions. It supports inheritance for an object, e.g. files can inherit permissions from their parent folder. Also every object has an Owner which is the user account that can set ownership and change permissions.

If you are interested in managing NTFS permissions, refer to the following article:

How to take ownership and get full access to files and folders in Windows 10

To save your time, you can add the 'Take Ownership' context menu. This will allow you to become the owner of the files and to instantly grant full access permissions to the files or folders.

Before proceeding, ensure that your user account has administrative privileges. Now, follow the instructions below.

  1. Download the following ZIP archive: Download ZIP archive.
  2. Extract its contents to any folder. You can place the files directly to the Desktop.
  3. Unblock the files.
  4. Double click on the Add_Take_Ownership_context_menu.reg file to merge it.
  5. To remove the entry from the context menu, use the provided file Remove_Take_Ownership_context_menu.reg.

You are done!

How it works

The context menu opens a new PowerShell instance as Administrator, and sequentially executes the following commands.

takeown /f  - the command will change ownership for the selected object to the current user account. For directories, it will be executed with the arguments /r /d y. /r stand for recursive in order to process subfolders. The /d y argument is the default answer used when the current user does not have the "list folder" permission on a directory.

icacls /grant *S-1-3-4:F - the command gives the full access permissions to the current owner of the file system object (which is set to your current user account with the previous command). SID: S-1-3-4 is a well-known security identifier that represents the current owner of the object. When an ACE that carries this SID is applied to an object, the system ignores the implicit READ_CONTROL and WRITE_DAC permissions for the object owner.

That's it.

Related articles:

3 thoughts on “Add Take Ownership Context Menu in Windows 10

  1. Mossbrucker

    Hej,
    the reg-file works with files, but not with directories – the error is:
    Fehler: Ungültige Syntax. Der Wert ‘y’ kann für die Option ‘/d’ nicht verwendet werden.
    Any idea?
    Greetings from Bodensee
    Dieter

    Reply
    1. Sergey Tkachenko Post author

      It says that it doesn’t support the Y answer.
      I see such thing for the first time in my life.
      Could you provide the full path to your folder? I would like to try to reproduce the issue locally.

      Reply
      1. Mossbrucker

        The path is: g:\z_trash
        g: is the drive letter for an internal hard drive. g:\ z_trash is a directory with many subdirectories that was created during the parallel installation of Win10 and that is completely locked.

        Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.