Skip to main content

Windows Take Ownership =link= ✰

takeown /f "C:\Path\to\file.txt" icacls "C:\Path\to\file.txt" /grant YourUsername:F

Even if you log in as an Administrator, you do not automatically have full control over every file. System files (like C:\Windows\System32 ) are owned by NT SERVICE\TrustedInstaller . If you aren't TrustedInstaller, Windows blocks you. This prevents malware or clumsy users from deleting critical OS files and crashing the computer. windows take ownership

[HKEY_CLASSES_ROOT\Directory\shell\takeownership] @="Take Ownership" "Icon"="%windir%\System32\imageres.dll,-101" takeown /f "C:\Path\to\file

[HKEY_CLASSES_ROOT*\shell\takeownership\command] @="cmd.exe /c takeown /f "%1" && icacls "%1" /grant administrators:F" modify a program’s configuration file

Every Windows user has been there. You try to delete an old system folder, modify a program’s configuration file, or open a user profile from an old hard drive, and you are met with the dreaded pop-up: "You need permission to perform this action" or **"Access Denied."