How to fix corrupted system files in Windows 10

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.

fix corrupted system files

How to fix a corrupted system file in Windows 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

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!

Related reads:

  1. System File Checker SFC cannot repair corrupted member file
  2. Windows Resource Protection found corrupt files but was unable to fix some of them
  3. System File Checker not working, will not run or could not repair
  4. Windows Resource Protection could not start the repair service
  5. Run System File Checker in Safe Mode, Boot Time or Offline
  6. Repair the Windows Component Store using DISM
  7. DISM vs SFC first? What should I run first on Windows 10?
Posted by on , in Category Windows with Tags
Anand Khanse is the Admin of TheWindowsClub.com, a 10-year Microsoft MVP Awardee in Windows (2006-16) & a Windows Insider MVP. Please read the entire post & the comments first, create a System Restore Point before making any changes to your system & be careful about any 3rd-party offers while installing freeware.