How to fix corrupted system files in Windows 10

 

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.

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%Desktopsfcdetails.txt
  • CBS.Log %WinDir%LogsCBSCBS.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:WindowsSystem32wuapi.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:WindowsSystem32wuapi.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>Desktopwuapi.dll C:windowssystem32wuapi.dll

This should help!

Original Article