Windows 10: How to take ownership of system files via CMD? Solved

  1. TairikuOkami's Avatar
    Posts : 3,417
    10.6 Home 1809 x64
       24 Aug 2015 #1

    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. :)

    Code:
    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


 

Related Threads
How to 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...
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...
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...
system files to delete in Installation and Upgrade
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...
Solved How do i delete system files on other HDD? in Installation and Upgrade
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...
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 08:02.
Find Us