Windows 10: Change Owner of File, Folder, Drive, or Registry Key in Windows 10

Discus and support Change Owner of File, Folder, Drive, or Registry Key in Windows 10 in Windows 10 Tutorials to solve the problem; How to: Change Owner of File, Folder, Drive, or Registry Key in Windows 10 How to Change Owner of File, Folder, Drive, or Registry Key in Windows 10... Discussion in 'Windows 10 Tutorials' started by Neophile, Dec 25, 2015.

  1. Neophile Win User

    Change Owner of File, Folder, Drive, or Registry Key in Windows 10


    How to: Change Owner of File, Folder, Drive, or Registry Key in Windows 10

    How to Change Owner of File, Folder, Drive, or Registry Key in Windows 10


    An permissions.

    The owner of an object (ex: file, folder, drive, or registry key) has the right to allow or deny access to that resource. Although members of the Administrators group and other authorized users also have the right to allow or deny access, the owner has the authority to lock out non-administrator users, and then the only way to regain access to the resource is for an administrator or a member of the Restore Operators group to take ownership of it. This makes the file or folder owner important with respect to what permissions are allowed or denied for a given resource.

    Ownership can be taken or transferred in several ways. The current owner of an object can transfer ownership to another user or group. A member of the Administrators user right, for that matter).

    This tutorial will show you different ways to change the owner (take ownership) of a file, folder, drive, or registry key to any user or group in Windows 10.

    By default, you must be signed in as an administrator to be able to take ownership of an object.

    Do not change the owner of your Windows drive (ex: C: ). Doing so could result in Windows becoming very unstable.



    CONTENTS:
    • Option One: To Take Ownership of File, Folder, or Drive using Context Menu
    • Option Two: To Change Owner of File, Folder, or Drive using TAKEOWN Command
    • Option Three: To Change Owner of File, Folder, or Drive using ICACLS Command
    • Option Four: To Change Owner of File, Folder, or Drive in Advanced Security Settings Dialog




    OPTION ONE [/i] To Take Ownership of File, Folder, or Drive using Context Menu
    1 For how, see: How to Add 'Take Ownership' to Context Menu in Windows 10





    OPTION TWO [/i] To Change Owner of File, Folder, or Drive using TAKEOWN Command
    If you like, you could also type takeown /? in the elevated command prompt and press Enter to see a complete list of available switches and options that you could use with the takeown commands below.


    1 Open an step 2, step 3, or step 4 below depending on what object you would like to change owner of.


    2. To Change Owner of File using TAKEOWN Command
    A) In the elevated command prompt, type the command you want below, press Enter, and go to step 5 below.

    (To change owner to currently logged on user)
    takeown /F "full path of file with file extension"

    OR

    (To change owner to Administrators group)
    takeown /F "full path of file with file extension" /A

    Substitute full path of file with file extension with the actual full path of the file with it's file extension that you want to take ownership of within quotes.

    For example: takeown /F "C:\Windows\file.exe" /A


    3. To Change Owner of All Files with same File Extension in Folder or Drive using TAKEOWN Command
    A) In the elevated command prompt, type the command you want below, press Enter, and go to step 5 below.

    (To change owner to currently logged on user)
    takeown /F "full path of folder or drive\*.file extension"

    OR

    (To change owner to Administrators group)
    takeown /F "full path of folder or drive\*.file extension" /A

    Substitute full path of folder or drive with the full path of the folder or drive letter, and substitute file extension with the actual file extention that you want to take ownership of within quotes.

    For example: takeown /F "C:\Windows\*.txt" /A


    4. To Change Owner of Folder or Drive using TAKEOWN Command
    This command will take ownership of the folder or drive, and all files and subfolders in the folder or drive.


    A) In the elevated command prompt, type the command you want below, press Enter, and go to step 5 below.

    (To change owner to currently logged on user)
    takeown /F "full path of folder or drive" /R /D Y

    OR

    (To change owner to Administrators group)
    takeown /F "full path of folder or drive" /A /R /D Y

    Substitute full path of folder or drive with the full path of the folder or drive letter that you want to take ownership of within quotes.

    For example:
    takeown /F "F:" /A /R /D Y
    takeown /F "F:\Folder" /A /R /D Y


    5 When finished, you can close the elevated command prompt if you like.[/SIZE]

    6. You will now need to set permissions to allow you access to this file, folder, or drive.





    OPTION THREE [/i] To Change Owner of File, Folder, or Drive using ICACLS Command
    You could also type icacls /? in the elevated command prompt and press Enter to see a complete list of availble switches and options that you could use with the icacls commands below.


    1 Open an step 2, step 3, step 4, step 5 below depending on what object you would like to change owner of.


    2. To Change Owner of File using ICACLS Command
    A) In the elevated command prompt, type the command you want below, press Enter, and go to step 6 below.

    (To change owner to any user)
    icacls "full path of file with file extension" /setowner "user name" /T /C

    OR

    (To change owner to Administrators group)
    icacls "full path of file with file extension" /setowner "Administrators" /T /C

    OR

    (To change owner to TrustedInstaller)
    icacls "full path of file with file extension" /setowner "NT SERVICE\TrustedInstaller" /T /C

    Substitute full path of file with file extension with the actual full path of the file with it's file extension that you want to take ownership of within quotes.

    Substitute user name with the actual user name of the user account you want to set as owner within quotes. For a Microsoft account, you would use the email address as the user name.

    For example: icacls "C:\Windows\file.exe" /setowner "Administrators" /T /C


    3. To Change Owner of All Files with same File Extension in Folder or Drive using ICACLS Command
    A) In the elevated command prompt, type the command you want below, press Enter, and go to step 6 below.

    (To change owner to any user)
    icacls "full path of folder or drive\*.file extension" /setowner "user name" /T /C

    OR

    (To change owner to Administrators group)
    icacls "full path of folder or drive\*.file extension" /setowner "Administrators" /T /C

    OR

    (To change owner to TrustedInstaller)
    icacls "full path of folder or drive\*.file extension" /setowner "NT SERVICE\TrustedInstaller" /T /C

    Substitute full path of folder or drive with the full path of the folder or drive letter, and substitute file extension with the actual file extension that you want to take ownership of within quotes.

    Substitute user name with the actual user name of the user account you want to set as owner within quotes. For a Microsoft account, you would use the email address as the user name.

    For example: icacls "C:\Windows\*.txt" /setowner "Administrators" /T /C


    4. To Change Owner of Folder or Drive and All Contents using ICACLS Command
    A) In the elevated command prompt, type the command you want below, press Enter, and go to step 6 below.

    (To change owner to any user)
    icacls "full path of folder or drive" /setowner "user name" /T /C

    OR

    (To change owner to Administrators group)
    icacls "full path of folder or drive" /setowner "Administrators" /T /C

    OR

    (To change owner to TrustedInstaller)
    icacls "full path of folder or drive" /setowner "NT SERVICE\TrustedInstaller" /T /C

    Substitute full path of folder or drive with the full path of the folder or drive letter that you want to take ownership of within quotes.

    Substitute user name with the actual user name of the user account you want to set as owner within quotes. For a Microsoft account, you would use the email address as the user name.

    For example: icacls "C:\Windows\Folder" /setowner "Administrators" /T /C


    5. To Change Owner of Only Folder or Drive using ICACLS Command
    A) In the elevated command prompt, type the command you want below, press Enter, and go to step 6 below.

    (To change owner to any user)
    icacls "full path of folder or drive" /setowner "user name" /C

    OR

    (To change owner to administrators group)
    icacls "full path of folder or drive" /setowner "Administrators" /C

    OR

    (To change owner to TrustedInstaller)
    icacls "full path of folder or drive" /setowner "NT SERVICE\TrustedInstaller" /C

    Substitute full path of folder or drive with the full path of the folder or drive letter that you want to take ownership of within quotes.

    Substitute user name with the actual user name of the user account you want to set as owner within quotes. For a Microsoft account, you would use the email address as the user name.

    For example: icacls "C:\Windows\Folder" /setowner "Administrators" /C


    6 When finished, you can close the elevated command prompt if you like.

    7 You will now need to set permissions to allow you access to this file, folder, or drive.





    OPTION FOUR [/i] To Change Owner of File, Folder, or Drive in Advanced Security Settings Dialog
    1 Do step 2 or step 3 below depending on what object you would like to change owner of.


    2. To Change Owner of File, Folder, or Drive in Advanced Settings
    A) Right click or press and hold on the file, folder, or drive that you want to change owner of, click/tap on Properties, and go to step 4 below.

    OR

    B) Select a file, folder, or open a drive that you want to change owner of, click/tap on the Share tab, click/tap on the Advanced security button in the ribbon, and go to step 5 below. (see screenshot below)


    Change Owner of File, Folder, Drive, or Registry Key in Windows 10 [​IMG]

    3. To Change Owner of Registry Key in Advanced Settings
    A) In the left pane of Registry Editor (regedit), right click or press and hold on the registry key that you want to change owner of, click/tap on Permissions, and go to step 4 below. (see screenshot below)


    Change Owner of File, Folder, Drive, or Registry Key in Windows 10 [​IMG]

    4 Click/tap on the Security tab, and click/tap on the Advanced button. (see screenshots below)

    If you see the left screenshot below, then it means that you have access to this item, and can change the owner to any user or group you like.

    If you see the right screenshot below, then it means that your user account does not have at least Read permission for this object. Basically, no access rights. When you get to step 8 below, you will need to change the owner to your user account name, and set permissions to allow you account full control at step 13 below.


    Change Owner of File, Folder, Drive, or Registry Key in Windows 10 [​IMG]

    5 At the top and to the right of the current Owner, click/tap on the Change link. (see screenshots below)

    Change Owner of File, Folder, Drive, or Registry Key in Windows 10 [​IMG]

    Change Owner of File, Folder, Drive, or Registry Key in Windows 10 [​IMG]

    6 If prompted by UAC, click/tap on Yes.

    7 Click/tap on the Advanced button. (see screenshot below)

    If you wanted to set the Administrators group as the owner, then type Administrators in the "Enter the object name to select" box, click/tap on Check Names to verify, and go to step 9 below instead.

    If you wanted to set TrustedInstaller as the owner, then type this below in the "Enter the object name to select" box, click/tap on Check Names to verify, and go to step 9 below instead.

    NT SERVICE\TrustedInstaller


    Change Owner of File, Folder, Drive, or Registry Key in Windows 10 [​IMG]

    8 Click/tap on the Find Now button. At the bottom under the Name column, select a user name (ex: Shawn Brink) or group (ex: Administrators) that you would like to change owner to, and click/tap on OK. (see screenshot below)

    Change Owner of File, Folder, Drive, or Registry Key in Windows 10 [​IMG]

    9 Click/tap on OK. (see screenshot below)

    Change Owner of File, Folder, Drive, or Registry Key in Windows 10 [​IMG]

    10 If this is a file, then click/tap on OK. (see screenshot below)

    Change Owner of File, Folder, Drive, or Registry Key in Windows 10 [​IMG]

    11 If this is a folder, drive, or registry key, then you will also have the option to check the Replace owner of subcontainers and objects box to also change the owner of the folder/drive contents or registry key subkeys as well if you like. Click/tap on OK. (see screenshot below)

    Change Owner of File, Folder, Drive, or Registry Key in Windows 10 [​IMG]

    12 If prompted, click/tap on Yes. (see screenshot below)

    Change Owner of File, Folder, Drive, or Registry Key in Windows 10 [​IMG]

    13 You will now need to set permissions to allow you access to this file, folder, drive, or registry key.

    That's it,
    Shawn


    Related Tutorials

    :)
     
    Neophile, Dec 25, 2015
    #1
  2. Shenan Stanley, Dec 25, 2015
    #2
  3. Smittychat., Dec 25, 2015
    #3
  4. Brink
    Brink New Member

    Change Owner of File, Folder, Drive, or Registry Key in Windows 10

    Hello Neophile, *Smile

    Did you change the owner to your account instead of "Administrators"?

    If so, then see if changing the owner and permissions of the parent key first, then going back to "Replace owner on subcontainers and objects" may do the trick.
     
    Brink, Dec 25, 2015
    #4
  5. Neophile Win User
    Hello Brink,

    Many thanks for your quick reply. I am using (logged on with) the Administrator account. So all my trials are under Administrator, and I chose Administrators as the Owner. Now, after your reply, I tried to add also my account to the owners, but it does not accept more than one owner, So I left it on Administrators and still logged in as that, but no inheritance *sarc.
     
    Neophile, Dec 25, 2015
    #5
  6. Brink
    Brink New Member
    As a test, change the owner to "Administrator" and permissions to "Allow" "Full Control" of the parent key first.

    Afterwards, go back to change owner again, but this time check Replace owner of subcontainers and objects and the inheritable permissions box at the bottom, and click OK to see if it applies then.

    What key are you doing this with?
     
    Brink, Dec 25, 2015
    #6
  7. Neophile Win User
    Eureka! It worked with your help, the priorities and coming back.

    This is rather complicated. I didn't intend to make you waste your time reading all this, but if you ask here it goes.

    I installed an old HP printer, but made a mistake with the letters at the ending of the model number. It appeared on "Devices and printers", but should have installed the right one (same model number, but different ending letters). I was an ass hole and installed the right one, without removing the other one. Then I started having printing problems. But I could not remove the first installed because it was no longer showing on "Devices and printers". So I started clearing al entries in the registry containing its name. All I could remove was only the last installed one, which was not working properly. This happened because I did not choose the right name. Windows 7 finds the printer and installs it itself, but with 10 I have to install it manually like in old times, from a list from manufacturers.

    Now, it is done, but for one key, because it has an entry allowing the owner to read only:
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\SWD\PRINTENUM\{A9862F5A-170C-4046-A6CE-1C78A158F95B}

    This key has three permission entries: System, Owner Riights, and Everyone. The Owner Rights Access is set to Read only!
    I put Administrators as the owner, and tried to clear the inheritances (MACHINE\SYSTEM\CurrentControlSet), as suggested on the error message, but it does not allow to save it that way, so I'm still blocked before reinstalling the printer with the right model name.

    I will give you the final result later because I have to go out now for a couple of hours.

    Thank you very much.
     
    Neophile, Dec 25, 2015
    #7
  8. Brink
    Brink New Member

    Change Owner of File, Folder, Drive, or Registry Key in Windows 10

    Great news. You should be able to change that last one to "Full Control" instead of "Read only".
     
    Brink, Dec 25, 2015
    #8
  9. Neophile Win User
    That is exactly where my last provable lies. I can't do that change. The Edit button on those entries is not Edit, but View.

    It seems that it doesn't accept any change, but I believe there must be a way that I ignore. Have you tried to take ownership of a printer subkey on your computer? I wonder. Any subkey under the following key is a printer of fax of any sort, as we can read on their FriendlyName values. It is one of those that I need to delete.

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\SWD\PRINTENUM

    I have changed quite a lot of permissions following your helping instructions. I am stuck with that one only. Sorry...
     
    Neophile, Dec 26, 2015
    #9
  10. Brink
    Brink New Member
    Brink, Dec 26, 2015
    #10
  11. Neophile Win User
    Oh! I am so sorry I haven't told you before, that is the account I have been using all along this drama to avoid other problems.
     
    Neophile, Dec 26, 2015
    #11
  12. Brink
    Brink New Member
    That's ok, I just thought you meant a normal administrator account.

    I found this below that you might see if the 4th post may help you with this as well.

    https://social.technet.microsoft.com...w7itproinstall

     
    Brink, Dec 26, 2015
    #12
  13. Neophile Win User

    Change Owner of File, Folder, Drive, or Registry Key in Windows 10

    GREAT, Brink! It finally worked. I read that thread at Technet and downloaded PsTools.
    First I tried the batch file to avoid difficulties, as recommended on a post about the middle of that thread, but it gave me an error:Couldn't install PSEXESVC service:
    Access is denied.
    Then, I tried the normal direct way on an elevated command prompt and Regedit opened righy away. I didn't have to use permissions and could delete that key directly from its context menu. It couldn't be easier. From what I read it would not be possible to change any security setting or delete the key with that Owner Rights entry. It was the same problem the thread starter had, even if with another key.

    Thank you very much for your great and helpful advices.
     
    Neophile, Dec 27, 2015
    #13
  14. Brink
    Brink New Member
    That's great news Neophile. I'm glad it could help. *Smile
     
    Brink, Dec 27, 2015
    #14
  15. balubeto Win User
    Hi

    I installed Windows ADK 10 v1511 on Windows 10 v1511 Enterprise 64 bit.

    I typed the following commands:

    Code: Dism /Apply-Image /ImageFile:"<wim_File_Path>\install.wim" /Index:1 /ApplyDir:"<Apply_Directory_Path>" /Verify /CheckIntegrity Dism /Capture-Image /ImageFile:"<Windows_Files_Path>\sources\install.wim" /CaptureDir:"<Apply_Directory_Path>" /Name:"<Edition_name>" /Description:"<Description_name>" /Compress:max /Verify /CheckIntegrity[/quote] Now, knowing that some directories and files have the TrustedInstaller or System user as owner, what are the commands that allows to completely remove the entire content of the <Apply_Directory_Path> directory?

    Thanks

    Bye
     
    balubeto, Jan 7, 2016
    #15
Thema:

Change Owner of File, Folder, Drive, or Registry Key in Windows 10

Loading...
  1. Change Owner of File, Folder, Drive, or Registry Key in Windows 10 - Similar Threads - Change Owner File

  2. Cannot change owner of folder

    in Windows 10 Software and Apps
    Cannot change owner of folder: Hi, when I try to enter the Windows Defender Scan folder it says I have been denied access to the folder despite being an administrator. When I try to change who the owner of the folder is in the security tab, It doesn't even give me the option to click on it to try and...
  3. Cannot change owner of folder

    in Windows 10 Gaming
    Cannot change owner of folder: Hi, when I try to enter the Windows Defender Scan folder it says I have been denied access to the folder despite being an administrator. When I try to change who the owner of the folder is in the security tab, It doesn't even give me the option to click on it to try and...
  4. Changing "owner" of Windows 10

    in Windows 10 Gaming
    Changing "owner" of Windows 10: I am gifting an older laptop to a relative. I have reformatted the hard drive and set up Windows 10 with my own MS account so that I could install a newly-purchased copy of Office, and some Norton security software as part of the gift.I need to learn how to instruct the...
  5. Changing "owner" of Windows 10

    in Windows 10 Software and Apps
    Changing "owner" of Windows 10: I am gifting an older laptop to a relative. I have reformatted the hard drive and set up Windows 10 with my own MS account so that I could install a newly-purchased copy of Office, and some Norton security software as part of the gift.I need to learn how to instruct the...
  6. Changing "owner" of Windows 10

    in Windows 10 Updates and Activation
    Changing "owner" of Windows 10: I am gifting an older laptop to a relative. I have reformatted the hard drive and set up Windows 10 with my own MS account so that I could install a newly-purchased copy of Office, and some Norton security software as part of the gift.I need to learn how to instruct the...
  7. File owner changes

    in Windows 10 Support
    File owner changes: I backup my files to a USB on another PC and the owner changes to a long string (S-1-5-21-2070691468-2192114673-407588093-1001) - what's going on??? 175144
  8. windows defender registry key change

    in AntiVirus, Firewalls and System Security
    windows defender registry key change: hi, my windows denfender services become disable , not sure why. I already take ownership of registry key of HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WinDefend then change start key from 4 to 2, it still unable to change the key? any idea?...
  9. Administrator doesn't have access to change owner in registry

    in AntiVirus, Firewalls and System Security
    Administrator doesn't have access to change owner in registry: Hello, the question is according to Windows 10 x64. I was trying to uninstall Symantec Endpoint Protection and uninstaller shows an error - access denied to registry. I was trying to change permission manually in registry with Admin account, but no luck. Still error -...
  10. Administrator can change owner of registry key but not permissions...

    in User Accounts and Family Safety
    Administrator can change owner of registry key but not permissions...: I'm running 64-bit Windows Pro on an Asus P5Q-EM MB with an Intel E8600 processor with 8 GB of PC2-6400 Ram. I've had a couple of unexpected shutdowns and restarts lately. I've got several different error types in my event log. The only one showing to be "critical" is the...