Introduction
Is your PC running slow for "no reason?" Is it exhibiting some weird behavior, that's hard to describe? Are some Windows elements not functioning or crashing? These all point to corruption of the Windows Operating System. Corruption can even cause failure to boot altogether.
Fixing this is less about hardware, and more about tinkering in command line. We promise it isn't as scary as you think. But be aware this kind of thing isn't for everyone.
-
-
Right click the start menu (or press Win and X on your keyboard).
-
In the menu that appears, open the command line tool it offers here. It may be Command, PowerShell or Terminal depending on your settings and version of Windows.
-
-
-
A window with some text and a blinking cursor should appear. Type sfc /scannow and press enter.
-
SFC checks system files against presumed good ones cached on your drive. Verification progress is displayed as it works through all files.
-
Once complete, a brief readout of the results will be shown. If errors were found, status of the repair is also noted.
-
-
-
The Deployment Image Servicing and Management (or DISM) tool is used to repair the files SFC uses to check your system.
-
In an open console session (like in Step 1) type dism /online /cleanup-image /restorehealth. This compares against an online image from Microsoft to perform repairs.
-
A progress bar will show in the console window and indicate when complete.
-
-
-
The /online part of the DISM command relies on Windows Update Service to work properly. If this is part of what's broken, DISM might fail.
-
Instead, use a new download of the Windows image from Microsoft to process the repair.
-
If you're not sure how to get a Windows .iso (image) file, use the USB Boot Drive Creation Guide, but on Step 6, select .iso and choose a location to save it.
-
-
-
Once the image download is complete, double click the .iso file to mount it.
-
It should appear in the sidebar of your File Explorer as a DVD drive. Make note of the Drive letter your computer assigns it. In this example it is the E: Drive.
-
Reopen, or return to your command line window. Type DISM /Online /Cleanup-Image /RestoreHealth /Source:E:\Sources\install.wim and press enter. Substitute the source drive letter here for what Windows has assigned the drive on your computer.
-
Wait for the command to finish. It will indicate if it failed.
-
-
-
If your system still seems like it's not running right, or you're continuing to see errors unrepaired by SFC, check the integrity of your disk with chkdsk
-
In your command line window type chkdsk c: /f /r
-
The /f and /r switches added to this command indicate to to fix errors on the disk and attempt to recover data in bad sectors.
-
The command will output the format of the disk (probably NTFS) and indicate the disk is in use. Type Y, then enter to give permission to run the scan on next restart.
-
Restart your computer and let the scan run through. It can take many hours to complete so be patient.
-
Completing all of these steps will leave your device with a much healthier Windows install, hopefully resolving any crashing, freezing or locking up. If you still cannot boot successfully to Windows, reinstalling will be a more effective option.