Question What causes file corruption ?

TheFlash1300

Prominent
Mar 15, 2022
312
7
695
When I type "sfc /scannow", sometimes it shows there are corrupted files. When I fix them, and some time passes after the fix, there are, again, corrupted files.

So, file corruption occurs from time to time...

Can someone explain to me what causes file corruption? My laptop doesn't have any CPU and RAM problems.

It's not a big deal for me, because corruption can be fixed easily and quickly, but I'm curious about what causes file corruption to happen.
 

Colif

Win 11 Master
Moderator
windows patches can also be the cause, they aren't always perfect

i would suggest running 2 commands when you run sfc, First command repairs the files SFC uses to clean files, and SFC fixes system files. it just removes chances that SFC can't fix everything.

right click start button

choose powershell (admin)

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

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

Colif

Win 11 Master
Moderator
There are dozens of reasons why your Windows files or system files might become corrupted, but among the most common are:

  • Sudden power outage
  • Power surge
  • Complete system crash
  • Mismatched versions
  • Updating errors

My previous post should fix it in most cases anyway.
 

USAFRet

Titan
Moderator
Can someone explain to me what causes file corruption?
yO73PAZ.jpg
 

TheFlash1300

Prominent
Mar 15, 2022
312
7
695
windows patches can also be the cause, they aren't always perfect

i would suggest running 2 commands when you run sfc, First command repairs the files SFC uses to clean files, and SFC fixes system files. it just removes chances that SFC can't fix everything.

right click start button

choose powershell (admin)

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

SFC = System File Checker. First command runs DISM - https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/what-is-dism?view=windows-11
As far as I know, when Windows repairs corrupted files, Windows uses files from a compressed file to replace the corrupted files with original files. And if the compressed file is infected, it will probably use infected files.

If I use this command:

"Repair-WindowsImage -Online -RestoreHealth"

Will the new files that will be used to replace the corrupted ones, be extracted from the original Windows copy kept on Microsoft servers, which would eliminate the possibility of any infected files?
 

Colif

Win 11 Master
Moderator
dism can grab files from online to fix the files on the system, so its not just restricted to the image files on your PC.

its why I suggest running it before SFC as then you have good files to check PC with.
there are versions of dism repair that allow you to use an ISO as well.