Task Sequence: Image Capture Wizard has failed with the error code (0x00004005)

If you have this error when you try to capture a image with SCCM

Task Sequence Error:

Running: Image Capture Wizard

Description:  Task Sequence: Image Capture Wizard has failed with the error code (0x00004005).

 

" Each OS capture will run sysprep command which will reset windows product activation. However, there is a max 3 times per computer limit for the sysprep command. After the 3 time, the clock to reset Windows Product Activation can no longer be reset." 

Solution: 

To overcome this 3 Sysprep time limitaiton, following are the walkaround:

1. Open regedit and look for:

HKEY_LOCAL_MACHINE\SYSTEM\Setup\Status\SysprepStatus\CleanupState\

Set to value: 2

HKEY_LOCAL_MACHINE\SYSTEM\Setup\Status\SysprepStatus\GeneralizationState\

Set to value: 7

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\WindowsNT\CurrentVersion\SoftwareProtectionPlatform\SkipRearm

Set to value: 1  

Then, run the command:

msdtc -uninstall (wait a few seconds)

msdtc -install (wait a few seconds) 

Then, reboot the system and try to run sysprep again.

Techent