Check and repair Windows system files and component store

Users of Windows are facing the situation from time to time, that certain features no longer work. The Windows Store is missing or there are updates problems and so on. Then the question arises, “how to repair Windows”? The following description applies to Windows 7, Windows 8, Windows 8.1, Windows 10 RTM (and higher).


Advertising


In Windows 8 the ‘Windows refresh’ approach has been introduced. But during Windows refresh you lose the installed programs and Windows needs some reworking (which isn’t discussed here). But there are alternative methods to be used, to repair a broken Windows. Windows refresh is only a last option. Lets have a look at the details.

Use System File Checker to repair damaged files

From Windows 7 and upward the first approach to repair a damaged Windows is a check for damaged system files. Open the window an administrative command (see Windows 10: Open command prompt window as administrator) and enter the command:

sfc / scannow

Press Enter and wait until the test is complete. If damaged files found, system file checker tries to repair those files.

SFC

If sfc isn’t able to repair broken system files, you can analyze the log files and try the methods discussed below to fix that issue. The log file is located at:

%windir%\logs\cbs\cbs.log

Some hints to analyze the log file created by sfc may be found in Microsoft’s article How to analyze the log file entries that the Microsoft Windows Resource Checker (SFC.exe) program generates in Windows Vista.

Repair broken packages in Windows 7

If sfc isn’t able to repair corrupted files, you can try manually to repair the damage. Just copy the missing files from another machine or from install.wim of an install image to the target folder of your machine. Microsoft has released an article Use the System File Checker tool to repair missing or corrupted system files that addressed briefly this approach.

In some cases, broken Windows update files are the cause of errors reported by system file checker. In this case, use CheckSUR (aka System Update Readiness tool) to repair the broken component. The download links for this tool and also some explanations may be found at Fix Windows Update errors by using the DISM or System Update Readiness tool.

I’ve seen several cases, where manifest files with wrong content, delivered via Windows update, was the root cause for unrecoverable sfc errors. In this case you have to wait, till Microsoft ships an amended update file.

Check Windows component store integrity and repair files

Broken packages in Windows component store (a Manifest is missing or damaged for instance) are sometimes the reason for malfunctions. Microsoft has retired System Update Readiness Tool checksur in Windows 8. From Windows 8 and upwards, the DISM command may be used to check and repair Windows component store integrity.

1. Open an administrative command prompt windows (see Windows 10: Open command prompt window as administrator).

2. Enter the commands give below to check and repair the Component Store.

The command:

Dism /online /cleanup-image /ScanHealth

checks the component storage for damage, but nothing is repaired. The process may take several minutes. Then, use the following command:

Dism /online /cleanup-image /CheckHealth

to check whether an damage of the Component Store is detected. The command checks a registry entry and reports, if damages are found and whether the damaged components can be repaired. The instruction:

Dism online /cleanup-image /RestoreHealth

is trying to fix the broken packages with internal methods. DISM uses Windows Update to provide the files that are required to fix corruptions. If your Windows Update client is already broken, use the following command:

DISM.exe /Online /Cleanup-Image
/RestoreHealth /Source:C:\RepairSource\Windows /LimitAccess

to repair damaged packages. The two lines shown above are one command (I formatted the command into two lines). The source parameter specifies the path to the Windows image. You can, for example, use a setup DVD as the source and specify the path to the folder, where the install.wim can be found. The /Limit Access option is only required if a WSUS server is used to distribute updates. A repair of the component store may take 10 to 15 minutes. Further details may be found in Microsoft’s KB-Article KB947821.

Can’t repair, try an in place upgrade repair

If the system not repairable, you can use an in place upgrade repair. Just insert a Windows install image (that correspondents to your installed Windows version). Fire up explorer.exe and navigate to setup.exe. Launch setup.exe and follow the instruction shown on the screen to update your system. See also this article for Windows 10 and use a similar approach in Windows 7 up to Windows 8.1.



This entry was posted in Windows and tagged , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *