1.    24 Aug 2015 #1
    Join Date : Oct 2014
    Posts : 2,974
    10.4 Home 1709 x64

    How to take ownership of system files via CMD?

    Google failed me this, people mentioned using setacl/subinacl, but no idea, how to use it.
    Running typical commands as admin does not work for system folders/files. Like those:

    takeown /f "C:\Program Files\Windows Defender" /a /r /d y
    icacls "C:\Program Files\Windows Defender" /grant Mikai:f /t /c
    icacls "C:\Program Files\Windows Defender" /setowner "Mikai" /t /c

    EDIT: Got it, better late than never. For the current user and for admins.

    takeown /s %computername% /u %username% /f "%SystemDrive%\Users\Public\Desktop" /r /d y
    icacls "%SystemDrive%\Users\Public\Desktop" /grant:r %username%:(OI)(CI)F /t /l /q /c
    takeown /f "%ProgramData%\Microsoft\Windows Defender" /a /r /d y
    icacls "%ProgramData%\Microsoft\Windows Defender" /inheritance:r /grant:r Administrators:(OI)(CI)F /t /l /q /c
    Last edited by TairikuOkami; 09 Sep 2017 at 14:17.
      My ComputerSystem Spec


Similar Threads
Thread Forum
User Accounts Add Take Ownership to Context Menu in Windows 10
This tutorial will show you how to add Take Ownership to the context menu of all files and folders for all users in Windows 10. This will allow you to be able to instantly take ownership of a file or folder (and all contents) by changing the...
System...... Windows log Files.
After rolling back my laptop from 10 to 8.1 over a week ago and did this weeks Windows 8.1 update, I cleaned up the Hard drive of all unnecessary files and ensured that my Settings did not permit Synchronization. Today, I had to use my Mobile...
General Support
Users not having ownership of files
I just noticed that a large amount of users than what is normally observed are having ownership issues. Do all files require ownership? How exactly does this happen. I don't own any external HDD, but I assume most people with external drives don't...
Chillout Room
system files to delete
There are 3 boxes that refer to Win 10 installation and when you try to delete them it says you will not be able to go back to your previous OS. It is substantial space as I believe one box contains something like x amount of GB's. I have imaged...
Installation and Upgrade
Solved How do i delete system files on other HDD?
i just installed windows 10 onto my first SSD (Made it my master drive) and i'd like to delete every file and folder on my old HDD except the one in which all my games are installed (Not program files its a folder labeled "Games" in the root...
Installation and Upgrade
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd
All times are GMT -5. The time now is 06:17.
Find Us
Twitter Facebook Google+ Ten Forums iOS App Ten Forums Android App

Windows 10 Forums