How can I repair corrupted system files?

Corrupted system files can cause a number of problems on your computer, from crashing programs to full system failures. Thankfully, Windows includes built-in utilities that can scan for and repair corrupted files. With some simple steps, you can identify and fix corrupted system files to get your PC running smoothly again.

What causes corrupted system files?

There are a few common causes of corrupted system files:

  • Faulty hardware – Issues like bad RAM, failing hard drives, and malware can alter or damage system files.
  • Improper shutdowns – If your computer loses power or doesn’t shut down properly, system files can be left in an unstable state.
  • Software conflicts – Installation errors, broken updates, and incompatible programs can lead to corrupted files.
  • Manual edits – Manually editing registry files or system configurations can cause corruption.

How can I identify corrupted system files?

There are some telltale signs your computer has corrupted system files:

  • Frequent crashes or blue screen errors
  • Freezing and lag, especially at startup
  • Error messages when running programs
  • Programs freezing or crashing
  • Recognizable files disappearing or becoming corrupted
  • Presence of unwanted pop-ups and malware

Corrupted system files can manifest in a variety of ways, so any unusual behavior could indicate a problem. The most definitive way to identify corruption is to use Windows’ built-in utilities.

Using System File Checker

The easiest way to scan for corrupted files is to use the System File Checker tool:

  1. Type “command prompt” into the Windows search bar and right-click on the Command Prompt app.
  2. Select “Run as administrator.”
  3. In the Command Prompt window, type “sfc /scannow” and hit Enter.

This will initiate a scan of your system files and replace any files that appear to be corrupted. The scan may take a few minutes to complete. Once finished, reboot your computer and see if the problems persist.

Understanding the System File Checker report

After scanning, SFC will provide a report. Here’s how to interpret it:

  • No problems detected – SFC did not find any corruption so the issue likely lies elsewhere.
  • Files were repaired – Corrupted files were identified and repaired. Reboot and verify the issues are resolved.
  • Could not repair files – SFC found corruption but was unable to repair them. Further troubleshooting is required.

Using DISM command

If SFC cannot repair the corrupted files, you may need to use the Deployment Image Servicing and Management (DISM) tool. DISM can repair system files by accessing a repository of known working versions.

To use DISM:

  1. Open Command Prompt as Administrator.
  2. Type “DISM /Online /Cleanup-Image /RestoreHealth” and hit Enter.
  3. DISM will scan and attempt to repair corrupted files from its repository.
  4. Reboot once it completes and test if issues are resolved.

Checking your hard drive for errors

Corrupted system files are often caused by errors on your hard drive. Checking for hard drive issues is an important step.

To scan your hard drive:

  1. Open the File Explorer.
  2. Right-click on your main system hard drive.
  3. Select “Properties” then click the “Tools” tab.
  4. Under Error-checking, click “Check”.
  5. Select Scan drive and let the scan run.
  6. Restart your PC once completed.

This will perform a thorough scan of the drive and attempt to repair any bad sectors or errors that could be causing file corruption.

Using System Restore

If previous system restore points are available, reverting to an earlier restore point can often fix system file corruption.

To use System Restore:

  1. Type “System Restore” into the Windows search bar and select it.
  2. Click “Next”, then choose a restore point prior to when you first noticed issues.
  3. Follow the prompts to revert your system to the restore point.

After the restore completes, reboot your PC and see if corrupted files are fixed.

Restarting Windows Update

Windows Update can sometimes install corrupted files or fail to properly update them. Restarting Windows Update may resolve the issues.

To restart Windows Update:

  1. Open Command Prompt as Administrator.
  2. Stop the BITS service and Windows Update service by typing:
  3. net stop bits
    net stop wuauserv

  4. Delete the SoftwareDistribution and Catroot2 folders by typing:
  5. ren C:\Windows\SoftwareDistribution SoftwareDistribution.old
    ren C:\Windows\System32\catroot2 Catroot2.old

  6. Restart BITS and Windows Update by typing:
  7. net start bits
    net start wuauserv

This will stop the update services, delete the folders storing update data, then restart the services so updates reinitialize from scratch.

Using thebootrec.exe tool

The bootrec.exe tool can help rebuild and repair damaged system files related to the Windows bootloader and related processes. To use bootrec.exe:

  1. Boot to the Windows Recovery Environment.
  2. Open Command Prompt.
  3. Type “bootrec /fixmbr” – This will repair the master boot record.
  4. Type “bootrec /fixboot” – This will write a new bootsector.
  5. Type “bootrec /rebuildbcd” – This will attempt to rebuild boot configuration data.

After running the commands, reboot normally and check if corrupted files are repaired.

Using SFC and DISM in Safe Mode

If corruption is preventing your system from booting normally, you can run SFC and DISM while in Safe Mode. This may allow them to better detect and repair damaged files.

To use SFC and DISM in Safe Mode:

  1. Reboot your PC and interrupt the boot process by spamming the F8 key.
  2. Select “Safe Mode with Command Prompt” from the menu.
  3. Run “sfc /scannow” and DISM scans as outlined earlier.
  4. Allow PC to reboot when finished and check for resolution of corruption issues.

Running anti-malware scans

Viruses and malware are common causes of system file corruption. Running a deep anti-malware scan can uncover and remove infections that may be damaging system files.

Some highly rated anti-malware tools include:

  • Malwarebytes
  • Windows Defender
  • Bitdefender
  • ESET NOD32

Completely remove any malware or viruses detected. Also update your anti-malware software regularly to prevent future infections.

Removing recently installed programs

Newly installed software, especially freeware, can sometimes contain bugs that interfere with system files. If corruption appears after installing something new, uninstalling that program may resolve it.

To uninstall programs:

  1. Open “Add or Remove Programs” in Windows Settings.
  2. Locate the recently installed program.
  3. Click Uninstall and follow the on-screen prompts.
  4. Restart your computer afterwards.

Test if removing the new program fixed the corrupted files by running SFC again.

Checking for failing hardware

Faulty RAM, aging hard drives, and other deteriorating hardware can cause file corruption. Use tools like Windows Memory Diagnostic and SeaTools to test your system’s memory and drives.

To check for hardware issues:

  1. RAM testing – Use Windows Memory Diagnostic or Memtest86+ to scan your RAM.
  2. Hard drive testing – Use SeaTools or the drive manufacturer’s tool to test hard drive health.
  3. Overheating – Open hardware monitoring software to check for overheating components.
  4. Device errors – Open Device Manager and check for devices displaying error codes.

Replace any components that fail testing or show signs of failure. This can eliminate corruption caused by defective hardware.

Performing a repair install of Windows

If no other troubleshooting steps resolve the corrupted files, performing a repair install of Windows may do so by completely replacing damaged system files.

To do a repair install:

  1. Boot from your Windows installation media.
  2. On the Install screen, select your language and click Next.
  3. Click “Repair your computer.”
  4. Select “Troubleshoot” then “Advanced options.”
  5. Choose “System Restore” then follow the prompts to reinstall Windows.

This will do an in-place reinstallation of Windows while preserving your personal files and applications.

Resetting your PC

If all else fails, performing a full reset of your PC will completely reinstall Windows from scratch and replace all system files.

To reset your PC:

  1. Open Windows Settings and go to Update & Security.
  2. Under Recovery, click Get Started.
  3. Choose either “Keep my files” or “Remove everything” depending on your preference.
  4. Follow the on-screen prompts to complete the reset process.

Resetting your PC wipes the slate clean, resolving even deep-rooted system file corruption.

Conclusion

With tools like SFC, DISM, System Restore and Windows Reset, you have several built-in options for repairing corrupted system files. Start with less drastic options like SFC before moving on to full Windows reinstalls or resets. Checking for malware and faulty hardware can also uncover underlying causes of file corruption. Finding and fixing damaged system files quickly can restore normal system function and prevent further issues down the road.