How to repair damaged Windows without reinstalling the system?
How to Repair a Damaged Windows Without Reinstalling?
Reinstalling the operating system is a time-consuming and labor-intensive process. As Lu Xun famously said:
Reinstalling the system is not difficult; what’s hard is backing up before the reinstall and restoring after it.
:)
So, if the system damage isn’t too severe, are there other ways to repair the current damaged system without reinstalling?
SFC Command
SFC is a tool provided by Microsoft for scanning and repairing system files. Its full name is System File Checker.
Using SFC.exe, we can scan and repair abnormal system files.
Here’s how:
Press the shortcut key combination
Win + RIn the “Run” dialog, type
cmdPress
Ctrl + Shift + EnterThis step ensures that cmd runs as an administrator.
In the cmd window, type the following command and press Enter:
1
sfc /scannow
This will launch the SFC system file check.
The SFC system file check takes a considerable amount of time, so please be patient.
DISM
The DISM tool is a system image maintenance tool introduced by Microsoft after Windows 7. Its full name is Deployment Imaging Servicing and Management.
The C:\Windows\winsxs folder in Windows stores hard links to the entire Windows system files. These hard links serve as backup copies to restore system files when they are damaged, and they completely overwrite the current system files when “Reset this PC” is executed in Settings.
In fact, the SFC tool works by comparing the files in the
winsxsfolder with the system files to identify errors, and then replacing the damaged system files with the files from thewinsxsfolder to repair the system.
So, a scenario we might encounter is: the backup system files in the winsxs folder are also damaged, causing SFC to detect the damaged system files but be unable to repair them using the files in winsxs.
This is where the DISM tool shines.
The purpose of DISM is never to directly repair system files; its function is only to check and repair the files in the winsxs folder.
Using DISM to Repair Files in winsxs
Use the
/CheckHealthparameter to quickly check if the system image is damaged:DISM /Online /Cleanup-Image /CheckHealthThis command is only for a quick check and will not fix any issues.
Use the
/ScanHealthparameter for a full scan:DISM /Online /Cleanup-Image /ScanHealthThis command records scan results to a log file and takes a long time.
Use the
/RestoreHealthparameter to repair the image:DISM /Online /Cleanup-Image /RestoreHealthThis command requires a network connection to download repair files from Windows Update. If you don’t have internet access, you can specify a local repair source (a WIM image with the same version number as the damaged system).
After using DISM, the files in the winsxs folder are repaired, allowing you to continue using SFC for file scanning.
What DISM repairs is the foundation for SFC to work.
Note: Sometimes running SFC scan and repair once may not fully fix the system. If you feel the system has a more serious failure, it is recommended to run SFC three times to thoroughly repair the system.
Reboot your computer between each run.
- In fact, the DISM tool is very powerful, and the features described in this article are just the tip of the iceberg. If you’re interested, you can search for DISM on the Microsoft official website for systematic learning, or use the graphical interface of the open-source GitHub software Dism++.