How to repair corrupted windows files
Corrupted files in a Windows operating system can disrupt your workflow, interfere with installed programs, and sometimes even prevent your computer from booting correctly.
File corruption occurs when a file’s structure becomes damaged, making it unreadable or unusable by the operating system or the application that created it. In Windows, corruption can affect anything from Word documents to critical system files required for booting.
Several factors can lead to corrupted files:
Sudden power outages during file saving
Hardware failure, such as a bad hard drive or faulty RAM
Software crashes
Malware infections
File system errors
Interrupted Windows updates
Understanding the root cause can often help prevent future instances of corruption.
Common Symptoms of File Corruption
Before jumping into repairs, it helps to identify whether corruption is the issue. Here are some symptoms you might encounter:
Frequent Blue Screen of Death (BSOD)
Programs crashing unexpectedly
Files refusing to open, especially system utilities
Missing DLL errors
Windows startup problems
Messages like “The file or directory is corrupted and unreadable”
Unresponsive system processes or extreme slowness
If you’re seeing these issues consistently, it’s likely that some part of your Windows installation has become corrupted.
Step 1: Run the System File Checker (SFC)
One of the most straightforward and built-in tools for checking and repairing corrupted system files is the System File Checker (SFC).
How to Use SFC:
Open Command Prompt as Administrator:
Press Windows + S, type “cmd”, right-click on Command Prompt, and choose Run as administrator.
Enter the command:
bash
CopyEdit
sfc /scannow
Press Enter and wait. This process may take up to 20–30 minutes depending on your system’s speed and the number of files to scan.
SFC will scan all protected system files and replace corrupted versions with cached copies stored locally. If it finds and repairs files, you will be notified at the end of the process.
Possible SFC Results:
Windows Resource Protection did not find any integrity violations – No issues were detected.
Windows Resource Protection found corrupt files and successfully repaired them – All corrupted files were fixed.
Windows Resource Protection found corrupt files but was unable to fix some of them – SFC was partially successful; further action is needed.
If SFC couldn’t fix all the issues, move on to DISM.
Step 2: Use the DISM Tool
The Deployment Image Servicing and Management (DISM) tool is more powerful than SFC and can repair the Windows image itself, which SFC relies on to replace corrupted files.
How to Use DISM:
Open Command Prompt as Administrator.
Run the following commands in sequence:
Scan the health of the system:
swift
CopyEdit
DISM /Online /Cleanup-Image /ScanHealth
Check if the image is repairable:
swift
CopyEdit
DISM /Online /Cleanup-Image /CheckHealth
Repair the image:
swift
CopyEdit
DISM /Online /Cleanup-Image /RestoreHealth
Wait for the operation to complete. This can take 10–30 minutes, depending on system health and performance.
After DISM finishes, rerun the SFC scan to ensure all corrupted files are now repaired.
Step 3: Check Disk for Errors (CHKDSK)
If your corruption issues relate to your drive rather than the system files, CHKDSK (Check Disk) can help locate and fix bad sectors or file system errors.
How to Run CHKDSK:
Open Command Prompt as Administrator.
Type the following command:
bash
CopyEdit
chkdsk C: /f /r /x
/f tells CHKDSK to fix any detected errors.
/r locates bad sectors and attempts to recover readable information.
/x forces the volume to dismount before scanning.
Press Enter.
If the drive is currently in use (which is usually the case for C:), you’ll be prompted to schedule a scan on the next reboot. Type Y and restart your PC.
CHKDSK will scan and repair issues before Windows boots fully. Depending on disk size and health, this process could take several hours.
Step 4: Use Windows Startup Repair
If corrupted files prevent Windows from booting normally, you can use Startup Repair from the Windows Recovery Environment (WinRE).
Accessing Startup Repair:
Boot your PC and interrupt the startup three times to trigger Automatic Repair.
Alternatively, boot from a Windows installation USB or DVD, then click:
Repair your computer > Troubleshoot > Advanced options > Startup Repair
Select your operating system and allow Windows to diagnose and fix issues automatically.
Startup Repair targets boot-related file corruption and can help fix boot records, BCD files, and essential startup DLLs.
Step 5: Perform a System Restore
System Restore can roll back your computer to a previous working state using restore points. It doesn’t affect your personal files but will remove recently installed apps, drivers, and updates.
How to Use System Restore:
Press Windows + R, type rstrui, and press Enter.
Select a restore point created before the corruption issues began.
Follow the on-screen instructions to complete the restoration.
If no restore points are available, or the feature is disabled, System Restore won’t be an option. In that case, proceed to more advanced solutions.
Step 6: Repair Installation Using Windows ISO
A repair install (also known as an in-place upgrade) reinstalls Windows over the existing version without deleting your files, apps, or settings.
How to Do a Repair Install:
Download the Windows Media Creation Tool from Microsoft’s official site.
Run the tool and choose Upgrade this PC now.
Follow the prompts and select Keep personal files and apps.
Allow the installation to complete. Your system will reboot several times.
This method replaces all corrupted system files and components with fresh copies while preserving your data.
Step 7: Use System Reset or Clean Install
If all else fails, you may need to reset or reinstall Windows entirely.
Option 1: Reset This PC
Go to Settings > System > Recovery.
Under Reset this PC, click Get started.
Choose:
Keep my files – Removes apps and settings but keeps personal data.
Remove everything – Resets the computer to a clean state.
Follow the on-screen instructions.
Option 2: Clean Install
If corruption is deeply rooted or affects multiple partitions, a clean install may be your best choice.
Create a bootable USB using the Windows Media Creation Tool.
Boot from the USB and follow installation steps.
Choose Custom: Install Windows only (advanced) and delete all partitions before proceeding.
Install Windows on the unallocated space.
Back up your data before doing a clean install, as it will remove everything.
Step 8: Scan for Malware
Sometimes, file corruption is a result of malware or ransomware that intentionally damages or locks your files.
What to Do:
Use Windows Defender Offline Scan:
Go to Settings > Privacy & Security > Windows Security > Virus & Threat Protection.
Click Scan Options and choose Microsoft Defender Offline scan.
Alternatively, use a reputable third-party tool like Malwarebytes or Bitdefender.
Ensure your definitions are up-to-date and perform a full system scan. Once threats are removed, rerun SFC and DISM to repair any lingering file corruption.
Step 9: Restore from Backup
If you maintain regular backups, you may be able to recover clean versions of corrupted files.
Options:
Use File History (Settings > Update & Security > Backup).
Restore files from OneDrive or another cloud backup.
Retrieve system images or disk backups created with third-party software like Acronis, Macrium Reflect, or EaseUS Todo Backup.
Keeping routine backups can drastically reduce the impact of future corruption.
Step 10: Check Hardware Health
If corruption is a recurring problem, hardware issues may be the culprit. Failing drives, unstable RAM, and overheating can all cause corruption.
Diagnostics to Try:
Run Windows Memory Diagnostic:
Type mdsched in the Run dialog and press Enter.
Choose to restart and scan memory.
Check SMART data of your hard drive using CrystalDiskInfo or similar tools.
Use manufacturer diagnostics for your SSD/HDD (e.g., Seagate SeaTools or Samsung Magician).
Inspect power supply and system temperatures using tools like HWMonitor.
If hardware tests fail, replacing the faulty component is essential to prevent further corruption.
Preventing Future Corruption
Once your system is healthy again, take steps to minimize the chances of file corruption returning:
Use a UPS or battery backup to prevent sudden shutdowns.
Keep Windows updated regularly.
Avoid forcing reboots while updates or installs are running.
Run antivirus software and stay vigilant for malware.
Monitor disk health and replace failing hardware early.
Back up your data often with automated solutions.
Repairing corrupted Windows files can seem intimidating, but with the built-in tools and the right steps, most issues can be resolved without a full reinstall. From quick scans using SFC and DISM to more in-depth approaches like repair installations or system resets, there’s a solution for almost every level of corruption. Understanding the causes and symptoms of file corruption, coupled with regular maintenance and backups, is key to a healthy and reliable Windows system.