How To Use System File Checker To Fix Missing Windows System File

6:19:00 PM |

1. First you need to run command prompt as an administrator. To do so, open start menu, type cmd in the search box, right click on cmd and select “Run as administrator”.
In the command prompt window, type sfc /scannow as a command and press “Enter”. It will start system scan and you can see the progress right inside the command prompt window, as shown below:
clip_image002
2. When the system scan is complete, you will see which of the system files were corrupted and the reasons behind the malfunction.
In my case the system file checker tool (SVC.exe) displayed “Windows Resource Protections did not find any integrity violation”. It means my computer has no missing or corrupt system file.
clip_image003
How to solve the problem if SFC tool fails to replace corrupted file
The System file checker tool automatically fixes all the missing Windows files that were corrupted because of software installatons or you accidentally deleted them.
But suppose your computer finds any corrupt or missing file and fails to replace it (sometimes it happens). In that case, you can always check those files that could not be repaired by the System File Checker tool.  Following is a method to do that:
1. Open the command prompt window with administrative priviledges.
2. Now type a command findstr /C:”[SR] Cannot repair member file” %windir%\logs\cbs\cbs.log >sfcdetails.txtand press Enter.
clip_image004
3. Go to C –> Windows –> System 32 folder and open a file sfcdetails.txt. It is a log file that contains entries for a file that could not be repaired by SFC.exe tool. Note down the file name and the location of file.
4. In the command prompt, type this command
takeown /f C:\windows\system32\filename and press Enter. (filename is the name of missing file)
5. Now type type icacls C:\windows\system32\abc.dll /grant administrators:F as a command and press Enter (replace the abc.dll with filename in command)
6. Now open Windows explorer and find the copy of that file by searching it using the search box. Suppose you want to find a copy of System.Runtime.Remoting.dll file. You have to type the file name in the search box and it will show all the files inside that folder (check the screenshot below).
clip_image005
7. Note the location of the duplicate file. You have to copy this file to the missing file location.
7. Type command Copy Path_And_File_Name_Of_Source_FilePath_And_File_Name_Of_Destination to replace the file with copy of the file.
For example type copy C:\windows\Microsoft.NET\framework\abc.dll C:\windows\system32\abc.dllto copy abc.dll file from one location to another. Remember you have to change the file name with abc.dll with the missing file name.
Following the above method, you can replace invalid or corrupt windows files from command prompt and solve your computer issues.