How To Replace System Files

less than 1 minute read


If you ever need to replace system files in Windows, follow these steps.

To Resolve:

  1. run => cmd => takeown /f C:\Windows\System32\filename.dll

  2. Now replace the file with a copy you got.

  3. Now type cacls C:\Windows\System32\filename.dll /G (UserProfileName):F. That command gives you permission to access the file. Press Y to take ownership of the file.

  4. In a script you would use the following to take control of a file and delete it:

    takeown /f "%windir%\System32\filename.extension" /r /d y
    icacls "%windir%\System32\filename.extension" /grant administrators:F /t
    rd /s /q "%windir%\System32\filename.extension"

Spotted a mistake in this article? Why not suggest an edit!
Did you like the article? Donations are always welcome!