If you ever need to replace system files in Windows, follow these steps.
run => cmd =>
takeown /f C:\Windows\System32\filename.dll
Now replace the file with a copy you got.
cacls C:\Windows\System32\filename.dll /G (UserProfileName):F. That command gives you permission to access the file. Press
Yto take ownership of the file.
In a script you would use the following to take control of a file and delete it:
1 2 3
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"