Solved

Trying to run DISM RestoreHealth on Win 10 offline

Posted on 2016-07-29
25
91 Views
Last Modified: 2016-08-31
I have a machine running Win 10 that I am told was fine until one day it wouldn't boot.  I've tried my normal steps (safe mode, system restore, bootrec) without success.  From the CMD prompt (in PE) I ran sfc /scannow and it indicated that there were errors it could not fix.  Since this was from PE, it didn't make a log file.

I tried to use DISM, but have been unsuccessful.   I've not run DISM in the offline mode before, so this could just be a simple error on my part.

The command I used was:

DISM.exe /Image:d:\ /Cleanup-image /Restorehealth /Source:d:\w10\install.wim /LimitAccess /scratchdir:d:\scratch

D: is the drive with the Windows installation.  I've used three different copies of install.wim: from the ISO created with the latest Media Creation Tool as well as two recent copies (Pro and Home).  All are 64-bit as is the failed system.

I did create the D:\scratch folder in response to a message that the scratch folder may not be large enough.

The command jumps right to 20%, then churns away for a while (5-10 minutes?) then a window pops up with the error: The exception unknown software exception (0xc0000420) occurred in the application at location 0x00007FFCC8414720.

The location isn't always exactly the same number, but I believe it's the same up to the 7FF.

What I found on the error code was that it had to do with incorrect versions, which is why I tried several different install.wim files.

Do I have the syntax wrong?  Otherwise, what do I need to do to get DISM to attempt a RestoreHealth?
0
Comment
Question by:CompProbSolv
  • 11
  • 9
  • 3
  • +1
25 Comments
 
LVL 91

Expert Comment

by:nobus
ID: 41735463
here a technet article ofr running the offline DISM; i hope it helps :
https://technet.microsoft.com/en-us/library/hh824869.aspx
0
 
LVL 42

Expert Comment

by:Davis McCarn
ID: 41735701
I have found that forcing a shutdown in Windows 10 by holding in the power button is extremely dangerous as it corrupts the SOFTWARE hive, the TileLayerDatabase, and in some cases, messes up the permissions on the filesystem.
Fixing the non-booting is usually fixable by using the files in the REGBAK folder and I now carry a good copy of the default TileLayerDatabase on a flash drive.  If; however, I also find screwed up permissions (which would clobber DISM's ability to fix things), my only current fix is a wipe and reload (YUCH! And, Thank You, Microsoft).
0
 
LVL 90

Expert Comment

by:John Hurst
ID: 41735738
After a number of Windows 10 roll up updates, DISM loses its source.

For that error above, and DISM will not run (mismatch):
Go to Microsoft Tech Bench and download the 64-bit English ISO
Burn the ISO to a DVD so as to see all the files

First mount the file as follows:
DISM.exe /Mount-Wim /WimFile:C:\test\images\myimage.wim /index:1  /MountDir:C:\test\offline

Then run the DISM command

See if that works.

Also, if getting DISM to run is a bit daunting, you can easily do a Windows 10 Repair Install and keep everything (do not lose anything).

https://www.microsoft.com/en-us/software-download/windows10

Click on Upgrade to Windows 10 (even though Windows 10 is running), allow drivers to update, then select the options to Keep Data and Keep Applications.
0
 
LVL 20

Author Comment

by:CompProbSolv
ID: 41735871
When I read the link nobus sent (along with many others I've found)  they talk about online and offline instances of Windows.  As I read it, "online" means the copy of Windows from which you booted.  That's great if your copy actually boots, but of no value when it won't.

The references to "offline" appear to always refer to a .wim or .vxd file as being what you are trying to repair as opposed to a Windows installation that won't boot.  This is also great if you are trying to modify an image but not very useful for a Windows installation.

Am I misunderstanding what DISM can do with a non-booting installation of Windows?
0
 
LVL 90

Expert Comment

by:John Hurst
ID: 41735874
You need the system to boot to use DISM or else if not booting, try the Media Creation Link ISO and boot from a bootable DVD.
0
 
LVL 20

Author Comment

by:CompProbSolv
ID: 41743456
Trying to keep this alive....   I'm getting my hands back on the computer and will provide further details.
0
 
LVL 90

Expert Comment

by:John Hurst
ID: 41743464
This was posted last week. Now Version 1607 is out.

Use the Media Creation Link above, run in place, Keep Data and Keep applications. This will reinstall Windows 10 and you will not lose anything.
0
 
LVL 20

Author Comment

by:CompProbSolv
ID: 41743467
"run in place" as in run it from the PE or boot from the DVD/USB?
0
 
LVL 90

Expert Comment

by:John Hurst
ID: 41743469
Open the link, click on Upgrade to Windows 10 (even though running). click on Download and the Open or Run instead of Save. It will run, present the options to keep everything (which you should do) and when done you will be on version 1607.
0
 
LVL 20

Author Comment

by:CompProbSolv
ID: 41743479
Are you suggesting that I do this from a normally running installation of Windows 10 or from the Troubleshooting/Diagnostic/PE choices?
0
 
LVL 90

Expert Comment

by:John Hurst
ID: 41743484
You can do this from a normally running installation of Windows 10.

My own ThinkPad would not upgrade and I forced the upgrade with the Link above and all is running smoothly.
0
 
LVL 20

Author Comment

by:CompProbSolv
ID: 41743502
That's what I was afraid of.  The system won't boot to anything but the Troubleshooting/PE mode.
0
Want to promote your upcoming event?

Are you going to an event? Are you going to be exhibiting at a tradeshow? Talking at a conference? Using a promotional banner in your email signature ensures that your organization’s most important contacts stay in the know and can potentially spread the word about the event.

 
LVL 90

Expert Comment

by:John Hurst
ID: 41743506
You can download the ISO and create bootable DVD from it and do it that way. That will also work.
0
 
LVL 20

Author Comment

by:CompProbSolv
ID: 41749561
I downloaded the latest ("Anniversary") ISO and have tried to use it.
If I boot from it or run it from the Troubleshooting environment, then it won't let me do an upgrade.  It says I have to run it from the Windows installation I'm trying to "upgrade".  This is consistent with what I've seen in Windows 7 (or Vista?) and newer.

I expanded the ISO and copied it to D:\Win10 and ran the following command:

dism /image:d:\ /cleanup-image /restorehealth /source:esd:d:\download\win10\sources\install.esd:2 /limitaccess /scratchdir:d:\scratch

The Windows installation that I'm trying to repair is on D:.  I created D:\scratch.  I've tried the command with and without the ":esd" after "/source".  In all cases I get the 0xc0000420 error.

The ":2" was used as this is Windows 10 Home which appears to be the second index in the esd file.  I've tried it with ":1" and without the index spec with similar results.

I originally tried the same steps with the previous "latest" version of Windows 10 with similar results.  That version had the same version number as what is installed on the drive.

I tried something much simpler:
dism /image:d:\ /cleanup-image /scanhealth /scratchdir:d:\scratch
I get the same 0xc0000420 error.

I've attached the DISM.log file for this.  I noted the following:
at 14:29:52 there is an error, though it is not clear to me to which file it is referring.  I believe it is resolved at 14:29:53 where it loads the provider from the scratch folder.

The next error I'm noticing is also at 14:29:53 regarding PEProvider.dll, but the line after that seems to indicate this is fine.

The errors that I think are significant are at 14:31:46: DISM Package Manager processed the command line but failed. HRESULT=800706BE

It seems odd to me that a command that is just expected to identify errors but not actually fix them could exit so "ungracefully".

I've proposed to start over with a new Windows installation, but the client has some software on here for which he will have difficulty downloading updates as they are no longer available.  I'd really like to fix this in place.

Has anyone here actually used the DISM command to repair an offline installation of Windows?  Do I have the command syntax correct?

Any other suggestions would be appreciated.
0
 
LVL 90

Expert Comment

by:John Hurst
ID: 41749568
The ISO you download has an ESD file, not a WIM file and DISM won't work with the ESD file

You can reinstall Windows 10 any number of times once it has run once and activated. I think you imply that in the first post.

If so, back up the data and use the ISO to do a fresh install.
0
 
LVL 20

Author Comment

by:CompProbSolv
ID: 41749607
As mentioned, I'm trying to avoid a fresh install because of software availability issues.

I'm trying two other approaches:  a clean install on another drive and using it as the source; converting the ESD to WIM.
0
 
LVL 42

Expert Comment

by:Davis McCarn
ID: 41750186
Your HRESULT=800706BE leads to a lot of other threads where folks wound up doing a fresh install as nothing would fix it.  Several of the threads reported that DISM did not think there was a valid installation of Windows to repair.
Please take the time to check C:\Windows\System32\Config and C:\Windows\System32\Config\Regbak.  Inspect the files; especially SOFTWARE.  If there is a variance in their sizes, copy the existing files to a new folder (I like to name it BACKUP-08-09-16) and then copy the files from the regbak folder back to config.  Try to boot into Safe Mode.  If that works, let me know what other issues remain.
0
 
LVL 20

Author Comment

by:CompProbSolv
ID: 41756943
I ended up copying the entire drive to another drive as a backup in preparation for a clean installation of Windows.  I tried to boot from the drive copy just to confirm that it behaved as the original and I was successful at booting into Safe Mode!  This leads me to believe that there is a problem with the original drive even though it passes the manufacturer's tests, shows no SMART errors, and passes chkdsk without errors.

I'm now trying to clean up the drive from Safe Mode.

I did try a different approach with DISM that will be useful in the future.  I installed a clean copy of Windows on a different drive, booted it with the non-booting drive as the second drive, and then ran the offline DISM commands.  I had better success with getting the command to complete and also to produce log files.
0
 
LVL 42

Expert Comment

by:Davis McCarn
ID: 41757726
If you want the truth on the old drive, get the free trial of http://www.hdtune.com 's pro version and run the error scan on the drive.  Even one red box will nail the problem; though, I also see a few (very rare) drives where the scan struggles hard which is evidenced by a serious drop in the scanning speed entry on the lower right side of the scan window.
0
 
LVL 20

Accepted Solution

by:
CompProbSolv earned 0 total points
ID: 41764009
I was incorrect about my belief that there was a problem with the original drive.

The original drive wouldn't boot into Safe Mode.  I have concluded that some of the steps that I took (sfc and dism) resolved that issue but I didn't check for Safe Mode booting after those repairs.  I was only looking at whether or not it would boot normally or allow those repairs to complete successfully.

I was able to boot into Safe Mode, install Windows 10 Anniversary update, then clean up from there.  The system is working well now.
0
 
LVL 90

Expert Comment

by:John Hurst
ID: 41764013
I asked you here to install Windows 10 again (I suggested the MCL) and is that not what you did?  https:#a41735738
0
 
LVL 20

Author Comment

by:CompProbSolv
ID: 41764014
The key was how to get to being able to install Win 10 again, not doing it.  You suggested installing it from a running installation of Win 10 which was not available at the time.  I was only able to get to the PE/Diagnostic boot which wouldn't allow the installation.
0
 
LVL 90

Expert Comment

by:John Hurst
ID: 41764017
Whatever. Carry on.
0
 
LVL 20

Author Closing Comment

by:CompProbSolv
ID: 41777740
My comment explains what resolved the issues.
0

Featured Post

How does your email signature look on mobiles?

Do your employees use mobile devices to reply to emails? With mobile becoming increasingly important to the business world, it is in your best interest to make sure that your email signature looks great across all types of devices.

Join & Write a Comment

Suggested Solutions

For a variety of reasons, it sometimes makes sense to reboot a Windows-based computer on a regular, perhaps daily basis. This "cures" a lot of ills by resetting processes, flushing caches, refreshing memory, and reestablish network connections. In a…
The use of stolen credentials is a hot commodity this year allowing threat actors to move laterally within the network in order to avoid breach detection.
This video Micro Tutorial explains how to clone a hard drive using a commercial software product for Windows systems called Casper from Future Systems Solutions (FSS). Cloning makes an exact, complete copy of one hard disk drive (HDD) onto another d…
Windows 8 came with a dramatically different user interface known as Metro. Notably missing from that interface was a Start button and Start Menu. Microsoft responded to negative user feedback of the Metro interface, bringing back the Start button a…

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now