MobDojoStart learning free

Windows Inside & Out · Troubleshooting Windows · Lesson 3 of 5

Repairing System Files

Use SFC and DISM to repair Windows itself, and CHKDSK to check the drive.

10 min50 XPLab in Pro

SFC and DISM in plain words

Windows is made of thousands of system files, the files Windows itself needs to run. Sometimes one gets damaged. A sudden power cut, a failed update or a failing drive can do it. Damaged system files can cause crashes, odd errors or features that stop working.

Windows has two built-in repair tools for this. You run them by typing a command, an instruction you type instead of clicking.

SFC stands for System File Checker. It checks every protected system file against a good copy kept on your PC. If a file is damaged, SFC swaps in the good copy. The command is sfc /scannow.

DISM stands for Deployment Image Servicing and Management. That is a long name for a simple job. DISM repairs the store of good copies that SFC uses. If that store is damaged too, SFC cannot fix everything. DISM can download fresh copies from Windows Update. The command is DISM /Online /Cleanup-Image /RestoreHealth.

Think of a mechanic and a parts shelf. SFC is the mechanic who swaps broken parts. DISM restocks the shelf.

A sensible order for home use:

  1. Run SFC.
  2. If it says it found problems it could not fix, run DISM.
  3. Restart, then run SFC again.

Microsoft's own guide runs DISM first, then SFC. Either way works, as long as you finish with SFC. Each scan can take 10 to 30 minutes. Let it finish, and do not close the window early.

On a Mac, you do not need these tools. macOS seals its system files and checks them itself.

On the practice computer, run sfc /scannow and read what it found and fixed. Then run the DISM command and read its result.

Running as administrator, and CHKDSK

SFC and DISM change important files, so Windows only lets an administrator run them. An administrator is an account allowed to make big changes to the computer. On a home PC, the main account is usually an administrator.

To run the commands the right way:

  1. Right-click the Start button.
  2. Choose Terminal (Admin). On some PCs it says Windows PowerShell (Admin).
  3. A box asks if you want to allow this app to make changes to your device. This is User Account Control, a safety check. Click Yes, because you opened it yourself.
  4. The window title now says Administrator. Type the command and press Enter.

If you skip the admin step, SFC tells you that you must be an administrator. Just close the window and start again.

A word of caution. An admin Terminal can change anything. Only type commands you understand and trust, like these two. Never paste commands that a stranger or a pop-up gives you.

CHKDSK, short for Check Disk, is a third tool. It checks the drive itself, the part that stores your files, for errors in how files are organized and for damaged spots. You can run it without typing. Open File Explorer, right-click the C: drive, choose Properties, then Tools, then Check. If the C: drive needs a deeper repair, Windows may run it at the next restart, since it cannot fix a drive while Windows is using it. Drive errors that keep coming back can be an early sign the drive is wearing out, so back up your files.

Hands-on lab

Try it on the practice computer

This lesson has a lab on a pretend computer right in your browser: windows, menus and settings that behave like the real thing. Nothing you do touches your own computer.

Open the lab
Test yourself

Can you answer these?

  1. SFC reports damaged files but says it could not fix some of them. Which tool should you run next?
  2. SFC refuses to run and says you need more rights. What kind of account or window does it need? (One word)

Answer them in the app to earn 50 XP (Pro).

Answer in the app