Image Capture Wizard has failed with error code (0x80004005)

Problem:

When triyng to perform a image capture of a Windows 7 client using a SCCM 2007 CD I received the message “Task Sequence: Image Capture Wizard has failed with error code (0x80004005)….”

Image Capture Wizard has failed with error code (0x80004005)

Also when I tried to run Sysprep.exe manually from C:\Windows\System32\sysprep I received the error “A fatal error occurred while trying to sysprep the machine”

A fatal error occurred while trying to sysprep the machine

And in the C:\Windows\System32\sysprep\Panther\setuperr.log I found the below errors;

[0x0f0073] SYSPRP RunExternalDlls:Not running DLLs; either the machine is in an invalid state or we couldn't update the recorded state, dwRet = 31

[0x0f00ae] SYSPRP WinMain:Hit failure while processing sysprep cleanup external providers; hr = 0x8007001f
Cause:

Cause:

After a little digging I found that my problem was caused due to Microsoft only allowing you to Sysprep a machine 3 times.

Microsoft’s official line is after you have syspreped 3 times you need to create a new image.

This error indicates that you syspreped the machine more then 3 times, you cant do that… if the windows system was already activated by pre OEM activation you cant even re-arm the machine. So you have 2 problems, one – can’t Sysprep any more and probably you can’t re-arm your machine (it wont let you Sysprep if you can’t re-arm.).

Workaround:

  1. First run slmgr.vbs /dlv and check the re-arm counter towards the bottom is zero
  2. If it is not zero then you may be able to get away with running slmgr.vbs –rearm else you will need to use an unattend.xml file
  3. Either add the below to your existing unattend.xml or there is an example unattend.xml at the bottom of his post. Save the unattend.xml file to C:\Windows System32\sysprep
<settings pass="generalize">
<component name="Microsoft-Windows-Security-SPP" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SkipRearm>1</SkipRearm>
</component>
</settings>
  1. Run slmgr.vbs –rearm
  2. Use regedit and navigate to HKEY_LOCAL_MACHINE\SYSTEM\Setup\Status\SysprepStatus\GeneralizationState\ and change CleanupState to 2 and GeneralizationState to 7
  3. Start => Run : msdtc -uninstall (wait few seconds)
  4. Start => Run : msdtc -install (wait few seconds)
  5. Restart the computer
  6. Try Sysprep or SCCM again and you should be OK

Notes:

  • Using this unatten.xml will make the product key window appear during the setup
  • The SCCM task sequence message can also be caused on its own, if you don’t have the SCCM client installed.

References:

http://blogen.creed-tech.net/miscellaneous/sysprep-your-windows-os-for-more-then-3-times/
http://support.microsoft.com/kb/929828
http://support.microsoft.com/kb/947212

Example unattend.xml File

<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
<settings pass="generalize">
        <component name="Microsoft-Windows-Security-SPP" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
            <SkipRearm>1</SkipRearm>
        </component>
    </settings>
</unattend>

 

4 thoughts on “Image Capture Wizard has failed with error code (0x80004005)”

  1. Just a point to note, I had to type out that unattend.xml file from your example (it’s going onto a disconnected system. Your sample above is missing the root element, took me a while to pinpoint that error.

    Reply
  2. Thank you for the advice this is still very much happening today two years later. I’ve been trying to sysprep Windows 8.1 I had two major issues, McAfee agent and I had disabled the Windows Store Service. Once McAfee Agent was removed and the service changed to manual I was able to sysprep without issue.

    It took days to track this one down.
    Without the notes above the retrying process would have been that much worse. Thanks

    Reply

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.