184459676690
academy
Security
Privacy
Performance
English

How to Fix Corrupted Files on Windows Using SFC And DISM

Windows system files undergird the most fundamental parts of your operating system. If they get corrupted, you can experience poor performance, critical errors, or complete system failure. Follow this guide to restore corrupted files using the SFC or DISM tools built into Windows. Then, optimize your computer's performance with Avast Cleanup to keep it running smoother for longer.

Avast-repair-corrupted-files-hero
Written by Harrison Gough
Published on January 8, 2025
This Article Contains
This Article Contains

    What are SFC and DISM?

    System File Checker (SFC) and Deployment Image Servicing and Management (DISM) are command-line tools, or cmd tools. They’re built into Windows operating systems (OS) and scan critical system files for corruption. If they find corrupted files, SFC or DISM will try to repair or replace them.

    Although both command tools have a similar purpose, they work differently. Here’s a quick summary of the difference between SFC and DISM:

    • SFC checks each individual system file against a known, trusted version of the same file stored in a protected folder called the Windows File Protection (WFP) cache. If a system file being checked doesn’t match the WFP version, SFC tags it as corrupt and attempts to replace it with a clean copy.

    • DISM scans and repairs Windows system files by checking the entire current system condition against a clean copy, or “image,” of the OS stored locally or online. If it finds the current system has corrupted or missing files, it attempts to replace them from the clean system image.

    In short, SFC is a good first port of call when you want to fix individual corrupt system files, while DISM offers a more comprehensive and powerful solution for broader problems SFC can’t solve.

    How to run System File Checker with SFC scannow

    If you are concerned about corrupt system files, permanently deleted a system file by accident, or need to fix a Blue Screen of Death, running the sfc command with the /scannow flag in a cmd window may help repair the issue.

    On Windows 11, Windows 10, Windows 8 or 8.1, and Windows 7

    Running the SFC scannow command is the same on Windows 7 through Windows 11, making it a reliable tool for diagnosing or repairing system files on most current Windows systems. Here’s a detailed guide on running SFC scannow to diagnose or repair system files:

    1. Open the Start Menu and type cmd, right-click Command Prompt, and select Run as administrator.

      Screenshot showing how to open Command Prompt on Windows
    2. Click Yes on the pop-up window, and then type sfc /scannow and press Enter to begin the scan.

      Screenshot showing how to run the SFC scannow command on Windows

    SFC scannow results

    After your scan is completed, you’ll see one of a few different messages. Here’s what each SFC scannow result means:

    SFC scannow result

    What it means

    Windows Resource Protection did not find any integrity violations.

    Windows found no issues with your system files. If problems persist, the issue likely stems from another source, not corrupt system files.

    Windows Resource Protection found corrupt files and successfully repaired them. Details are in the CBS.log: %inDir%\logs\cbs\cbs.log

    Windows found one or more corrupted files and successfully repaired them using the known good files stored in its cache.

    Windows Resource Protection found corrupt files but was unable to fix some of them. Details are in the CBS.log: %Windir%\logs\cbs\cbs.log

    The cache that SFC uses to restore corrupted files has also been corrupted — try using a DISM command to repair the cache using an online or local Windows image.

    Windows Resource Protection could not perform the requested operation.

    The scan was not able to complete — try rebooting into safe mode, running the DISM command, and running the SFC scan again.

    Running SFC with Windows recovery media

    In severe cases of system file corruption, you may be unable to boot into Windows. First, try booting into safe mode. If that fails, you can repair, reset, or restore your system using Windows recovery media — a toolset typically stored on a USB device, DVD, or CD.

    This is how to run the SFC scannow command through Windows recovery media:

    On Windows 11, Windows 10, and Windows 8 or 8.1

    Once you’ve loaded your Windows recovery media and set your system to boot from it, the steps to run an SFC command are the same regardless of whether you’re on Windows 11, 10, 8, or 8.1:

    1. Select Troubleshoot from the Choose an option menu, then select Command Prompt.

      A screenshot showing how to open the Command Prompt window in Windows recovery media
    2. In Command Prompt, type sfc /scannow /offbootdir=C:\ /offbootdir=C:\Windows and press Enter.

      A screenshot showing how to run an SFC scannow command in Windows recovery media

    Note that you should replace “C:\” with whatever drive your Windows installation is stored on.

    On Windows 7

    The process is practically the same on Windows 7, with just a few minor differences. This is how to run the SFC scannow command from a Windows 7 device using Windows recovery media:

    1. Boot from the Windows 7 installation DVD or USB drive.

    2. Select Repair your computer, choose your Windows installation, and click Next.

    3. Select Command Prompt, and once it has opened type sfc /scannow /offbootdir=C:\ /offwindir=C:\Windows and press Enter to begin the scan.

    Again, take care to replace “C:\” with whatever drive your Windows installation is stored on.

    How to run the DISM command on Windows

    If the Windows File Protection (WFP) cache that SFC pulls recovery files from is corrupted, you may need to use the DISM command to repair your Windows system. DISM checks the integrity of your entire system in one go, rather than on a file-by-file basis, by comparing it to a known good image stored locally or online.

    There are several flags you can use when running a DISM cleanup scan. Here’s what each one does and how you can use it to repair your system:

    • /checkhealth checks for logged system file issues and reports whether they still exist. It’s a quick way to confirm previously identified corruption without performing a full scan.

    • /scanhealth scans the current Windows image against a clean version to detect corruption, logging any issues without attempting repairs. It’s useful for confirming suspected corruption and planning your next steps.

    • /restorehealth performs a full scan of the current Windows image against a clean version, repairing any corrupted files it finds. It's used when system instability is caused by corruption and an SFC scan has failed to resolve the issues.

    Here’s how you can run a DISM repair scan on your Windows computer:

    1. Open the Start Menu and type cmd, right-click Command Prompt and select Run as administrator, then click Yes on the popup window that appears.

    2. Type dism /online /cleanup-Image /restorehealth into the command prompt window and press Enter to perform the scan and repair of a corrupted image. Alternatively, replace /restorehealth with /checkhealth or /scanhealth as needed.

      A screenshot showing how to run a DISM scan on Windows

    Does Windows 7 have DISM?

    DISM is not available on Windows 7, or earlier versions of the OS. However, there is a similar Microsoft tool called System Update Readiness Tool (SURT) that you can download from the Microsoft Update Catalog.

    SURT is similar to DISM in that it will look to restore and repair corrupted system files. If you’re using Windows 7 and SFC is not able to fix issues with corrupted files, SURT is your next best bet.

    What are Windows system files?

    Windows system files are essential files that power the most critical and fundamental elements of the Windows operating system. They contain the core system components, drivers, libraries, and settings that all versions of Windows rely on to work correctly.

    If these system files become corrupt, Windows will experience major performance or usability issues. These issues can range from individual programs being inaccessible to a complete system failure that prevents your computer booting properly.

    Illustration representing system file corruptionCorrupted system files can stop your PC working smoothly

    How do Windows files become corrupted?

    There are lots of potential ways system files can get corrupted, but these are some of the most common issues:

    • Faulty hardware or software: Old, failing components like hard drives or SSDs or software that contains bugs or malicious code can lead to corrupted files.

    • Computer crashes: Crashes, such as those caused by faulty services running in svchost, can cause system file corruption if they interrupt a critical system process.

    • Malware or infectious viruses: Malware or infectious computer viruses often target system files to disrupt or gain control of the system, sometimes causing file corruption.

    • Hard disk issues: Excessive bloatware or junk files can clog your hard drive, leaving no room for temporary files created by system updates and potentially causing corruption.

    • Power surges or outages: If your computer shuts down unexpectedly during an important read/write operation due to a sudden power loss, it can lead to system file corruption.

    • Incomplete system updates: Interrupting an important system update can leave your system in an inconsistent state, with only some files updated, potentially causing system file corruption.

    To help avoid these situations and prevent system file corruption issues, follow the same tips for speeding up your PC to keep your system running smoothly.

    Clean up your Windows devices with Avast Cleanup

    If your computer is running slowly or throwing up errors, but you’ve checked for corrupted system files and found none, our PC optimizer tool might be your solution.

    Avast Cleanup scans your system from top to bottom, finding junk files, bloatware, and redundant programs that could be harming your computer’s performance. Use it to reclaim storage space and help resolve performance issues to get your computer running smoothly again and keep it that way.

    FAQs

    Should I run SFC or DISM first?

    In general, the SFC command should be attempted first. If SFC fails to resolve your issues and your computer uses Windows 8 or later, you can then move on to trying DISM commands. On Windows 7, you can try SFC first and if that fails, use the System Update Readiness Tool.

    Can I manually replace a corrupted system file?

    Yes, you can manually replace a corrupted file, but it’s usually not recommended and should only be done as a last resort. You need to ensure the new file comes from the same OS version, edition, and update level to ensure compatibility. It’s best to rely on built-in tools like SFC and DISM when repairing corrupted files.

    When should I do a system restore?

    If SFC and DISM don't resolve file corruption issues, a full system restore may help. This reverts your system to a clean state while preserving personal files like documents and photos. Alternatively, you could perform a complete reinstallation of Windows, but this will wipe all your user data, so be sure to back up important files first.

    Latest Performance Articles

    How to Fix Corrupted Files on Windows Using SFC And DISM

    How to Lower CPU Usage on Windows

    How to Fix the Blue Screen of Death (BSOD) on Windows 10 and 11

    How to Clean Your Computer Screen Without Damaging It

    How to Clear Cache in Chrome and Other Browsers

    How to Hide Apps on an iPhone

    How to Screen Record on Your Mac or Macbook (With or Without Audio)

    How to Delete Cache and Cookies on Your iPhone

    How to Clear Your Cache on a Mac

    How to Turn off Safe Mode on Your Android Phone or Tablet

    How to Fix Mac’s Startup Disk Full Error Message

    How to Manage and Delete Photos and Files From iCloud

    Supercharge your iPhone with Avast Cleanup

    Free install

    Supercharge your Android with Avast Cleanup

    Free install
    Cleaning
    Performance
    Harrison Gough
    8-01-2025