Everyday Toolkit

Fix Corrupted Windows Files: A Practical Step-by-Step Guide

Published 2026-07-25

Updated Jul 2026

Some links on this page are affiliate links. If you buy through them we may earn a small commission at no extra cost to you. We only recommend what we'd use.

Key takeaways
  • Start with System File Checker (SFC) for quick system file repairs
  • Use DISM when SFC encounters damaged or missing repair images
  • Check drive health with CHKDSK to isolate bad physical sectors
  • Roll back unstable updates or driver changes using System Restore
Fix Corrupted Windows Files: A Practical Step-by-Step Guide
Photo: cambodia4kidsorg (BY) via Openverse

Fix Corrupted Windows Files: A Practical Step-by-Step Guide

To fix corrupted Windows files, launch an elevated Command Prompt and run `sfc /scannow` to let Windows repair damaged files automatically. If SFC reports that it cannot fix the issues, run DISM commands (`dism /online /cleanup-image /restorehealth`) to clean up the underlying system image, or use System Restore to revert your PC to a stable state.

Understanding Corrupted Windows Files

Corrupted Windows files occur when crucial operating system code becomes scrambled, unreadable, or missing, triggering system freezes, Blue Screens of Death, and application crashes. Identifying file corruption early allows you to repair system stability using built-in diagnostic utilities before minor operating system glitches lead to total system failure or boot errors.

When system files break down, Windows acts unpredictably. You might notice your desktop freezing out of nowhere, essential settings menus failing to open, or generic error codes appearing when launching programs. Sometimes the OS runs fine until a background service tries to touch a damaged binary, causing an immediate crash. Addressing these issues early stops small file corruptions from cascading into larger boot problems.

What Causes File Corruption?

Windows file corruption typically stems from sudden power loss, improper system shutdowns, hardware degradation like failing SSDs, or software conflicts during system updates. Malware infections also intentionally rewrite or erase system files, while bad drive sectors prevent Windows from reading essential system binaries correctly during standard boot sequences.

A cut in power mid-update is probably the most common scenario. When Windows is overwriting system files during an update, a sudden shutdown leaves partial binaries on the drive. Similarly, aging storage drives develop bad sectors over time. If a system file lands on one of those degrading sectors, Windows won't be able to read it properly, leading to corruption errors.

Running the System File Checker (SFC)

Fix Corrupted Windows Files: A Practical Step-by-Step Guide
Photo: Takuyakoz (BY-SA) via Openverse

The System File Checker (SFC) is a native Windows command-line utility designed to scan protected system files and replace corrupted or missing copies with healthy cached versions. It serves as your primary troubleshooting step because it operates quickly, requires no internet connection, and leaves personal data entirely intact.

SFC inspects protected operating system files across your drive. If it catches a mismatched file hash, it pulls a fresh copy from a compressed cache folder located inside the Windows directory (specifically `%WinDir%\System32\dllcache`). Because it's lightweight and safe, running SFC should always be your initial move when Windows behaves strangely.

How to Use SFC

To run SFC, open the Windows search bar, type "cmd," right-click Command Prompt, and select "Run as administrator." Type `sfc /scannow` and press Enter to initiate a full scan. Allow the process to reach 100% completion before closing the terminal or rebooting your computer.

  1. Open the Windows Start Menu, search for Command Prompt, right-click the top result, and pick Run as administrator.
  2. In the command window, enter `sfc /scannow` and hit Enter.
  3. Let the process scan your storage drive completely. This generally takes anywhere from 5 to 15 minutes depending on your drive speed.
  4. Read the terminal summary. Windows will let you know if it found corruption, if it successfully repaired the files, or if it couldn't resolve the issue.

If SFC displays "Windows Resource Protection found corrupt files but was unable to fix some of them," don't panic. That simply means the local cache copy is damaged too, which is where DISM comes in handy. You can inspect specific scan details by opening the log file stored at `C:\Windows\Logs\CBS\CBS.log`.

Employing the Deployment Image Servicing and Management (DISM) Tool

Deployment Image Servicing and Management (DISM) is an advanced command-line tool that repairs the local Windows component store used by SFC. When SFC cannot fix corrupted files due to a damaged source image, DISM fetches clean replacement files directly from Microsoft’s Windows Update servers to restore system integrity.

Think of DISM as the repair mechanic for SFC. If the local cache SFC relies on gets damaged, SFC can't repair broken files on its own. DISM fixes that local repair repository by reaching out to official Windows Update servers online, pulling down fresh system files, and rebuilding the local component store.

Using DISM to Repair the Windows Image

To repair a corrupted Windows image with DISM, open an elevated Command Prompt and run `dism /online /cleanup-image /restorehealth`. Ensure your PC maintains an active internet connection so DISM can download fresh system files from Windows Update to replace corrupt components inside the local store.

  1. Launch Command Prompt as an administrator.
  2. Check image health first by typing `DISM /Online /Cleanup-Image /CheckHealth` and pressing Enter.
  3. Run a deeper diagnostic scan with `DISM /Online /Cleanup-Image /ScanHealth`.
  4. Execute the repair with `DISM /Online /Cleanup-Image /RestoreHealth`.

The repair command might look stuck around 20% or 60% for a few minutes, but let it finish. Once DISM completes its image repair successfully, run `sfc /scannow` one more time. Now that SFC has a clean source image to draw from, it will usually repair the remaining corrupted system files without issue.

Performing a System Restore

System Restore rolls back your computer's system files, registry settings, and installed drivers to a previously saved snapshot called a restore point. This process effectively undoes recent configuration changes, driver updates, or software installations that caused file corruption without erasing your personal documents or photos.

This feature is a lifesaver when a newly installed driver or software package leaves your operating system unstable. Windows creates restore points automatically before major system updates, but you can also make them manually. If command-line utilities fall short, rolling back to a point when your machine ran smoothly often fixes the problem.

How to Execute a System Restore

To run System Restore, search for "Create a restore point" in the Windows taskbar, open System Properties, and click the "System Restore" button. Choose a restore point created before your system stability issues began, confirm your selection, and allow Windows to restart and complete the rollback.

  1. Press the Windows Key, type restore point, and click Create a restore point.
  2. Under the System Protection tab, click the System Restore... button.
  3. Select Next, then pick a restore point dated before your system started crashing or throwing errors.
  4. Click Finish to start the restoration process.

Your computer will restart during this process, which can take 15 to 30 minutes. Keep in mind that programs, updates, and drivers installed after the restore point was created will be uninstalled, though your personal files will remain intact.

Checking Your Hard Drive for Errors

The Check Disk (CHKDSK) tool scans your storage drives for physical bad sectors, lost clusters, and file system anomalies that cause recurring file corruption. Running CHKDSK isolates damaged disk areas, flags bad sectors to prevent future data writes, and attempts to recover readable information from degraded storage blocks.

File corruption often returns if your physical drive is wearing down. If you keep running SFC and finding corrupted files week after week, the issue probably isn't software—it's hardware. CHKDSK inspects the actual structure of your hard drive or SSD to make sure bad blocks aren't corrupting data as it gets written.

Using CHKDSK to Scan for Disk Errors

To scan your primary boot drive for errors, open an elevated Command Prompt, type `chkdsk C: /f /r`, and press Enter. When prompted to schedule a disk check on the next system restart, press "Y", hit Enter, and reboot your PC so Windows can repair the drive off-line.

  1. Open an administrator Command Prompt.
  2. Type `chkdsk C: /f /r` (substitute `C:` if Windows is installed on a different partition) and press Enter.
  3. Type `Y` when prompted to schedule the check on the next reboot.
  4. Restart your PC. Windows will execute the disk scan before loading the desktop.

The `/f` switch tells the tool to fix disk errors, while `/r` locates bad sectors and recovers readable data. Scanning large drives can take time, so let the process run completely without forcing a power off.

Considering a Windows Reset

Resetting Windows reinstalls the operating system from scratch, wiping away deep-seated file corruption, driver conflicts, and registry errors that command-line utilities cannot repair. You can choose to keep personal files or remove everything, providing a clean slate without requiring external installation media like USB drives.

When SFC, DISM, and System Restore all fail to fix system issues, a reset is your most reliable remaining option before doing a clean partition wipe. It replaces every single system file with a fresh copy directly from Microsoft, eliminating persistent corruption.

Performing a Windows Reset

Editorial Team Author & reviewer

Hands-on reviewers testing tools, apps and services so you do not have to. Every article here is hands-on tested and human-reviewed before publishing.