SFC SCANNOW and DISM RESTOREHEALTH - Repair Corrupt Files

KYHI

Well-Known Member
Pro User
Messages
2,779
Here is a program to help users with corrupt windows files..
This program will run System File Checker and DISM commands to repair an online Windows image
and will look for the setup media to use as a repair source

Step 1: Download and Extract > IMAGE_HEALTH.ZIP
Step 2: Right-Click IMAGE_HEALTH.CMD > Select Properties > Select Unblock
Step 3: Insert your Windows Setup Media ( Mounted ISO or DVD or USB )
Step 4: Right Click on IMAGE_HEALTH.CMD and Run as Administrator

IMAGE HEALTH
download

This Program supports any ISO with either an Install.wim or Install.esd

2016-07-07 ImageHealth.png

The Preferred Method Of Use To Fix file Corruption Would Be To Select

Option 1 - /ScanHealth > if shows as Repairable,
then
Option 2 - /RestoreHealth > if shows as Missing Source Files,
then
Option 3 - /RestoreHealth /source

Note:
Dism uses the component store as it's main source for Image Repair, so best to Select Option 2
Before Selecting Option 3 and redirecting the repair source, to the Windows Setup Media..

Option 4 > will analyze the component store, it will tell you if the store needs to be cleaned up

Option 5 > will cleanup (Remove) superseded windows files over 45 days old in the component store

Option 6 > will cleanup (Remove) ALL superseded windows files in the component store

Option 7 > will run System File Checker - SFC /Scannow

Option 8 > will run Revert Pending Dism Actions (UnLock, The Locked Disk Message)

Option 9 > will run Disk Cleanup Manager in Extended Mode

Option 10 > will run CheckDisk on a Volume, to scan for and fix disk errors..

Option 11 > will run ShowKeyPlus to retrieve windows product key

Option 12 > will export 3rd Party System Drivers into a "Drivers" folder

Option 13 > will run a MS Tool that will Automatically move all the User files from the Windows.old folder to the corresponding locations within your new Windows installation.

Option 14 > will run a MS Tool that will Generate a GenuineTicket.xml File

Option 15
> will run Never10 to Enable or Disable the Windows 10 GWX Upgrade

Option 16
> will run windows iso downloader to allow download of > MS Windows and MS Office ISO's from TechBench

Note: Option 0

There are log files to help you and others troubleshoot DISM and SFC issues..
Those *.Log files will be created on your Desktop as *.txt files..
So you can post them easily in a forum..
 
Last edited by a moderator:
Fantastic, this is a constant and ongoing problem. How about expanding on this and making it into a real tutorial?
I'm not complaining, what you have is great and should help lots of people but a step by step tutorial could help even non-techy people to do this.
 
They look good Shawn. I've never seen them before nor did they ever pop up in a Google search for SFC/DISM problems which is a shame as they seem to cover it all.

I'll bet there are 8-10 SFC/DISM file corruption threads currently open in eightforums now. I'll take a lok and point them to those tutorial and see what happens.

Thanks, and thanks KYHI for you work too. I always learn from your posts.
 
Fantastic, this is a constant and ongoing problem. How about expanding on this and making it into a real tutorial?
I'm not complaining, what you have is great and should help lots of people but a step by step tutorial could help even non-techy people to do this.

I'll try-

Tool in case the original link disappears-

View attachment IMAGE_HEALTH.zip

Some pictures-

Media Creation tool-

Screenshot_240.png

Save your media to a usb drive.

Screenshot_239.jpg

Screenshot_239.jpg

Choose option #3-

screenshot_304.jpg

Then you will see-

Screenshot_230.png

Then-

Screenshot_236.png

Then-

Screenshot_235.png

Then-

Screenshot_234.png

Then-

Screenshot_233.png

Then-

Screenshot_232.png
Then-

Done.
Too many pictures.
Too hard to keep them in proper order.
 

Attachments

  • Screenshot_230.png
    Screenshot_230.png
    41.3 KB · Views: 200
Tool in case the original link disappears-

The original link was removed by the creator (Me) as the way the program was written it ran SFC as the very first command..

Having since realizes SFC is not the BEST Option to run first.. The program was re-written to allow user options, rather then just run command lines...

The Revision was posted via a link to my Dropbox at the request of Ztucker, last night via pm..

I choose not to repost the files, it in the forums at that time, because it is still work in progress for me..


And Dropbox allows me to update the program without having to constantly change the links or add/remove program

So in that manner, bypassing the Author, I take a little offense..
 
Jimmy (finally looked at your profile for a name :) ),

thanks for doing this and making it available. I've referenced several people to your post for how to fix component store source problems.
 
I downloaded and unzipped the file. When I [Step 3: Right Click on IMAGE_HEALTH.CMD and Run as Administrator] I get a message that says "Windows SmartScreen prevented an unrecognized app from starting". What is the difference in running this script and typing in the command manually?
 
KYHI Updated his post.

The difference is in finding the source files to recover from. The batch file does it, manually you would have to figure out what the batch file does then do those steps manually.
 
I downloaded and unzipped the file. When I [Step 3: Right Click on IMAGE_HEALTH.CMD and Run as Administrator] I get a message that says "Windows SmartScreen prevented an unrecognized app from starting". What is the difference in running this script and typing in the command manually?

Because you have to Right-Click on Image_Health .cmd file and unblock


Option # 3 is the only useful option in the program.
That's why I tested it.
The rest are useless. :(

Taking Requests...
Gonna add off-line Image Menu

/revertpendingactions - will unlock a LOCKED disk

KYHI Updated his post.
The difference is in finding the source files to recover from. The batch file does it, manually you would have to figure out what the batch file does then do those steps manually.

Script just makes it easier to run the commands - rather then typing them manually
Besides I sometimes CRS or my brain starts to hurt if I have to think to hard
 
The fact that, in option #3, dism can use the install.esd instead of an install.wim- which is no longer supplied, is a wonderful thing.

This is a very good thing. :)

Many thanks for this way of getting things done. :)

This will help a lot of people. :)

Keep up the good work. :thumbsup:
 
It does have it's upside..
Thank You..

It's funny because the Media Tool for windows 8.1 creates an install.esd -
the Media Tool for windows 10 creates the ISO with an Install.wim and the USB media with install.esd
 
The fact that, in option #3, dism can use the install.esd instead of an install.wim- which is no longer supplied, is a wonderful thing.

This is a very good thing. :)

Many thanks for this way of getting things done. :)

This will help a lot of people. :)

Keep up the good work. :thumbsup:

David, I tried to reply to your message to me on this subject, to thank you for your help. But the system said you weren't receiving personal messages (today at least??) so I will make it more public: thank you for helping me with a query on using dism and sfc/scannow.

You are always very helpful too.

Keep up the good work :thumbsup::thumbsup:
 
Just a newbie asking here...

I recently have used this on a new Windows 8.1 install and it worked. Can this (Image_Health) be used in Windows 7 sp1..?
 
The fact that, in option #3, dism can use the install.esd instead of an install.wim- which is no longer supplied, is a wonderful thing.

This is a very good thing. :)

Many thanks for this way of getting things done. :)

This will help a lot of people. :)

Keep up the good work. :thumbsup:

David, I tried to reply to your message to me on this subject, to thank you for your help. But the system said you weren't receiving personal messages (today at least??) so I will make it more public: thank you for helping me with a query on using dism and sfc/scannow.

You are always very helpful too.

Keep up the good work :thumbsup::thumbsup:

Check your rep points for further info. +10--- :)
 
Excellent work , KYHI. (@David Bailey, you can't rep me for this , since you have already repped me for nothing.:))

What impressed me is its ability to take in install.esd and work on it (which is the only thing available in Windows 8.1 download whether one writes it to a USB drive or writes the ISO). I really had no patience of going through the laborious process of converting .esd to .wim. Second, if Microsoft had changed its strategy and pushing .esd why is it not making DISM compatible with it? Your work really helped me to conclude that install.esd lacked the missing manifests and Payload in my case.

The screenshots:

1esd.JPG
I was really happy to see this thinking atleast now DISM will repair the corruptions.

2Failed.JPG

Alas! It did not happen.

4FailedDISN.JPG

The same missing Manifests and Payload

SFCOK.JPG

But the sfc /scannow says everything is right.

If it helps, this is pretty much outlined in the existing SFC and DISM tutorials. :)

DISM really only needs to be ran if SFC is unable to repair corrupted or modified system files.

http://www.eightforums.com/tutorials/3047-sfc-scannow-command-run-windows-8-a.html

(step 6 in OPTION TWO if regular /restorehealth is not able to fix)
http://www.eightforums.com/tutorials/26512-dism-fixing-component-store-corruption-windows-8-a.html

I would think to the extent install.esd would not be available to certain category of users the Option 6 has lost its relevance to that extent and that is where this Image_Health fills the gap.

All the same I would say that it helped me to start on it :).
 
the reason the source files are not present within the install.esd or wim for that matter, is because the payload was downloaded via a windows update
 
I get "Error: 87" when I run option 3. I get the same error whenever I run dism. Any clue?

Code:
===============================================================================
   Dism is restoring the online image health.
   This will take several minutes..
===============================================================================

Deployment Image Servicing and Management tool
Version: 6.3.9600.17031

Image Version: 6.3.9600.17031

[==========================100.0%==========================]

Error: 87

An error occurred while processing the command.
Ensure that the command-line arguments are valid. For more information, review the log file.

The DISM log file can be found at C:\WINDOWS\Logs\DISM\dism.log

Deployment Image Servicing and Management tool
Version: 6.3.9600.17031

Unmounting image
[==========================100.0%==========================]
The operation completed successfully.
 
post the DISM.log as dism.txt

windows\logs\dism\dism.log

try this version, remove .txt extension
 
Back
Top