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.

  1. G1H2VJMDnJkmEwd3
    • 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.

    • Be sure to open as Admin. You'll need your Admin powers to make run the needed repairs.

    • If your computer doesn't boot to Windows, most commands can also be used within Windows Recovery Environment.

  2. JwiHNdQn2bPbnPlP
    JwiHNdQn2bPbnPlP
    RrXogkZaC5ZSycA2
    EDDZsN6SPHnaDRUf
    • 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.

    • If you are in Windows Recovery, use sfc /scannow /offbootdir=C: /offwindir=C:\Windows\ instead. Replace C with the letter of wour Windows drive. If you don't know, assume it is C.

    • Once complete, a brief readout of the results will be shown. If errors were found, status of the repair is also noted.

  3. dfhy5wJVkNCaPIkU
    dfhy5wJVkNCaPIkU
    DaK4CdXgnRBp4cmi
    qbldTgXw2GOPBTJ6
    • The Deployment Image Servicing and Management (or DISM) tool is used to repair the files SFC uses to check your system.

    • Microsoft advises this be run before SFC in Windows 8 or newer.

    • 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.

    • Run SFC, especially if the first run through indicated it could not repair all corruption. DISM may have replaced the files that were previously damaged

    • Check your syntax closely. Spelling, spacing and punctuation all matter here) Incorrectly typed commands will often result in an Error 87.

  4. FeSKVcwTITDnQQGS
    • 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.

    • Although this Guide is for Windows 10, it is also relevant for 8 and 11.

  5. rbHXxcu2MXEBXWCM
    rbHXxcu2MXEBXWCM
    ylQKPYNMhqlVFyxw
    1EMsKRB654EFBklC
    • 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.

  6. jKDEBMTKUcByNRIF
    jKDEBMTKUcByNRIF
    qVvJb4SLUeCLdnHf
    • 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

    • If the disk you're checking is not labelled as the C drive, be sure to change the drive letter in the command.

    • 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.

Conclusion

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.

Alisha C

Member since: 04/12/20

32057 Reputation

0 comments