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;

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

  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