Before Reinstalling Windows, You May Want to Try This

Zed Clampet

Community Contributor
Corrupted Windows can cause many different problems. Have you reached a point where you are considering a new clean installation of Windows. You might want to try this before going with the nukes.

Type CMD into your desktop search bar and then right click on Command Prompt and select "run as administrator"

Now inside CMD, type DISM.exe /Online /Cleanup-image /Restorehealth

This repairs the Windows Component Store that is basically a cache of many system files. This will probably take a few minutes and will require Internet access.

When this is done, we should have clean files for Windows to use, so type into CMD sfc /scannow

This checks your Windows system files for corruption and replaces them with the files you previously repaired/replaced in your Windows Component Store. It will take just a few minutes and should not need an Internet connection. In fact, if you can't connect to the Internet, you could skip the first step, and try just running this. So long as your Windows Component Store was okay, this should fix your problem.

The entire process is very quick and won't do anything to personal files on your system. It is an effective tool to attempt before going nuclear.

Note: you'll often see the component store designated as Windows Side-by-Side or WinSxS
 
You need to be in CMD with Admin rights to do those two actions (or if in windows 11, use Terminal(admin)
the same commands can also be used in Powershell
copy/paste this command into window:

Repair-WindowsImage -Online -RestoreHealth

and press enter


Then type SFC /scannow

and press enter


Restart PC if SFC fixes any files as some fixes require a restart to be implemented

First command repairs the files SFC uses to clean files, and SFC fixes system files

SFC = System File Checker. First command runs DISM - https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/what-is-dism?view=windows-11

Sometimes DISM/SFC isn't enough to fix windows, so then you do a repair install

The only files lost during that process are any windows updates since the last Version update, but that doesn't take very long to replace. Its at most 5 updates. I did it myself once on last PC. Never had to reinstall Windows on that PC.

Some other choices:

just ran them myself, DISM needed to update some files off the net, and SFC found and fixed some corruption. Its a handy thing to run occasionally.
 
Last edited:

Zed Clampet

Community Contributor
You need to be in CMD with Admin rights to do those two actions (or if in windows 11, use Terminal(admin)

That's why I put that in the directions :)

PowerShell is a good suggestion. It has some advantages. I ran these yesterday because pinokio is so poorly written that it corrupts system files and causes Windows to suddenly turn off your computer. I've given up patching it and uninstalled it, and currently I'm trying to make a pinokio alternative (just for me).

The main problem with pinokio is that it isn't GPU agnostic, and it hasn't been properly updated to use the 50XX series GPUs. The person who codes it has a 4090, so....
 
  • Like
Reactions: Pifanjr

TRENDING THREADS

Latest posts