In this post, we will see how to manually replace a corrupted single Windows system file with a known good copy of the file, if the System File Checker is not working. The built-in System File Checker is a tool which you can conveniently run to replace potentially corrupted or missing system files with good ones. But it may happen that SFC is unable to replace the corrupted file and throws up an error message. In this post we will see how to manually replace a single corrupted Windows system file with a known good copy of the file, if the SFC is not working.
Read: How to use System File Checker to replace a single corrupted file.
Before you read on, you might want to first check our post Corrupted files in Windows: Explanation, Prevention & Recovery.
How to fix a Corrupted System File in Windows 11/10
First of all, you need to open the following log files and identify which particular file has been corrupted:
- %userprofile%\Desktop\sfcdetails.txt
- CBS.Log %WinDir%\Logs\CBS\CBS.log
You will be able to see the details there.
Once you know the name and path of the file, you will have to Take ownership of this corrupted file.
To do that, open an elevated command prompt,and execute the following command:
takeown /f FileNameAndPath
Here, FileNameAndPath represents the path and the file name of the corrupted file. For example, it it is wuapi.dll that has been corrupted then type:
takeown /f C:\Windows\System32\wuapi.dll
Next you have to grant administrators full access & control to this file.
To do that, open an elevated command prompt,and execute the following command:
icacls FileNameAndPath /GRANT ADMINISTRATORS:F
In our example it will be:
icacls C:\Windows\System32\wuapi.dll /grant administrators:F
Read: How to fix or repair corrupted or damaged Registry
How to replace a corrupted Windows system file with a good copy
Now, you need to replace the corrupted file with a good copy. To do this, open an elevated command prompt, and execute the following command:
copy NewFileLocation FileNameAndPath
Here, NewFileLocation is the location where you have saved the good file. So if you have saved it to your Desktop, in our example it will be:
copy C:\Users\<username>\Desktop\wuapi.dll C:\windows\system32\wuapi.dll
This should help!
Read: Corrupted files in Windows: Explanation, Prevention & Recovery
Related reads:
- Windows Resource Protection found corrupt files but was unable to fix some of them
- Windows Resource Protection could not start the repair service
- Run System File Checker in Safe Mode, Boot Time or Offline
- Repair the Windows Component Store using DISM
- DISM vs SFC first? What should I run first on Windows?