Share via


Image Capture Wizard has failed with the error code 0x00004005

Question

Friday, September 23, 2016 7:13 PM

Trying to capture an image from a VM (which I've done many times) using a newly created capture media and I am getthing this error message.  I know it is not a sysprep issue since it's a VM and I use snapshots but I've tried the following:

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)

Any other suggestions?

All replies (10)

Monday, September 26, 2016 4:16 PM ✅Answered

I have figured out that when I remove a local account (which I need) on the image, it captures fine.  If I create a new local account it won't work.   Anyone ever have anything like this happen?


Friday, September 23, 2016 9:42 PM

I know it is not a sysprep issue since it's a VM and I use snapshots

I just want to point here, that being in VM and using snapshots has NOTHING to do with sysprep :)


Saturday, September 24, 2016 11:42 AM

you are using SCCM to caputre image? and snapshots?

Does it help it create a new VM? I would prefer use MDT to capture image. Sorry can't help more, I have never done caputre image with SCCM.

Sandy


Saturday, September 24, 2016 2:38 PM

Yes using sccm to create capture media then mounting the ISO in my vm to capture. Been doing it for years. Just not sure why I'm getting the error this time around


Monday, September 26, 2016 7:15 AM

smsts.log should probably reveal you the reason...


Monday, September 26, 2016 9:06 AM | 1 vote

Hi,

    

     0x00004005 is a generic error. Could you check setupact.log and setuperr.log which provide some clues for this issue?

     The setupact.log and setuperr.log is in the C:\Windows\System32\Sysprep\Panther.

**     To capture an image, you could use “Build and Capture a reference operating system image” because this process is performed on a clean system automatically. Please refer to:** https://technet.microsoft.com/en-us/library/bb633062.aspx

 

Best Regards

Ray

Please remember to mark the replies as answers if they help and unmark them if they provide no help.
If you have feedback for TechNet Subscriber Support, contact [email protected].


Monday, September 26, 2016 2:44 PM

there is no smsts log because config manager does not exist on the OS therefore there are no ccm folder


Monday, September 26, 2016 2:49 PM

Hi,

    

     0x00004005 is a generic error. Could you check setupact.log and setuperr.log which provide some clues for this issue?

     The setupact.log and setuperr.log is in the C:\Windows\System32\Sysprep\Panther.

**     To capture an image, you could use “Build and Capture a reference operating system image” because this process is performed on a clean system automatically. Please refer to:** https://technet.microsoft.com/en-us/library/bb633062.aspx

 

Best Regards

Ray

Please remember to mark the replies as answers if they help and unmark them if they provide no help.
If you have feedback for TechNet Subscriber Support, contact [email protected].

When I attempt to open those logs I get access is denied


Monday, September 26, 2016 4:49 PM

there is no smsts log because config manager does not exist on the OS therefore there are no ccm folder

I remember troubleshoting capture media issues myself some day few years ago, and there was smsts.log but it was hidden behind User Profile hidden folders.

(If there is no CCM client installed, check for the SMSTS.log file in C:\Users\Administrator\AppData\Local\Temp\

Also a copy from another solution: Please look at the SMSTS.LOG file. That will tell you what the real reason is.

If you can't find the SMSTS.LOG file, then it means that TSMBAutorun.exe could not launch TSMBootstrap.exe. You should then look for the TSMBAutorun.log file (in the TEMP folder).

https://social.technet.microsoft.com/Forums/systemcenter/en-US/7dde4c87-bfaf-4c01-8e10-567bd7206d9b/sccm-capture-media-doesnt-run?forum=configmgrgeneral

This might help you also, read all posts there: https://www.windows-noob.com/forums/topic/5070-how-can-i-capture-an-image-using-capture-media-in-configmgr-2012/


Tuesday, September 27, 2016 12:54 PM

Sysprep did not complete successfully PrepareOS 9/27/2016 8:29:32 AM 5516 (0x158C)
RunSysprep(sCmdLine, bActivate, m_bDebug), HRESULT=80004005 (e:\nts_sccm_release\sms\client\osdeployment\prepareos\prepareos.cpp,1304) PrepareOS 9/27/2016 8:29:32 AM 5516 (0x158C)
Unable to sysprep the machine, hr=80004005 PrepareOS 9/27/2016 8:29:32 AM 5516 (0x158C)
pCmd->Sysprep(bActivate, bMsd), HRESULT=80004005 (e:\nts_sccm_release\sms\client\osdeployment\prepareos\main.cpp,270) PrepareOS 9/27/2016 8:29:32 AM 5516 (0x158C)
Sysprep'ing the machine failed, hr=80004005 PrepareOS 9/27/2016 8:29:32 AM 5516 (0x158C)
De-Initialization successful PrepareOS 9/27/2016 8:29:32 AM 5516 (0x158C)
Exiting with error code 16389 PrepareOS 9/27/2016 8:29:32 AM 5516 (0x158C)
Process completed with exit code 16389 TSManager 9/27/2016 8:29:32 AM 6068 (0x17B4)
!! TSManager 9/27/2016 8:29:32 AM 6068 (0x17B4)
Could not find CCM install folder. Don't use ccmerrors.dll TSManager 9/27/2016 8:29:32 AM 6068 (0x17B4)
Failed to run the action: Prepare Operating System. 
Unknown error (Error: 00004005; Source: Unknown) TSManager 9/27/2016 8:29:32 AM 6068 (0x17B4)
Do not send status message in full media case TSManager 9/27/2016 8:29:32 AM 6068 (0x17B4)
Set a global environment variable _SMSTSLastActionRetCode=16389 TSManager 9/27/2016 8:29:32 AM 6068 (0x17B4)
Set a global environment variable _SMSTSLastActionSucceeded=false TSManager 9/27/2016 8:29:32 AM 6068 (0x17B4)
Clear local default environment TSManager 9/27/2016 8:29:32 AM 6068 (0x17B4)
Let the parent group (Capture the Reference Machine) decides whether to continue execution TSManager 9/27/2016 8:29:32 AM 6068 (0x17B4)
The execution of the group (Capture the Reference Machine) has failed and the execution has been aborted. An action failed.
Operation aborted (Error: 80004004; Source: Windows) TSManager 9/27/2016 8:29:32 AM 6068 (0x17B4)
Could not find CCM install folder. Don't use ccmerrors.dll TSManager 9/27/2016 8:29:32 AM 6068 (0x17B4)
Failed to run the last action: Prepare Operating System. Execution of task sequence failed.
Unknown error (Error: 00004005; Source: Unknown) TSManager 9/27/2016 8:29:32 AM 6068 (0x17B4)

Failed to delete directory 'C:\SMSTaskSequence\WinPE' TSManager 9/27/2016 8:29:40 AM 6068 (0x17B4)
Cleaning up task sequence folder TSManager 9/27/2016 8:29:40 AM 6068 (0x17B4)
Unable to delete file C:\SMSTaskSequence\sms\bin\x64\CcmCore.dll (0x80070005). Continuing. TSManager 9/27/2016 8:29:40 AM 6068 (0x17B4)
Unable to delete file C:\SMSTaskSequence\sms\bin\x64\CcmUtilLib.dll (0x80070005). Continuing. TSManager 9/27/2016 8:29:40 AM 6068 (0x17B4)
Unable to delete file C:\SMSTaskSequence\sms\bin\x64\msvcp120.dll (0x80070005). Continuing. TSManager 9/27/2016 8:29:40 AM 6068 (0x17B4)
Unable to delete file C:\SMSTaskSequence\sms\bin\x64\msvcr120.dll (0x80070005). Continuing. TSManager 9/27/2016 8:29:40 AM 6068 (0x17B4)
Unable to delete file C:\SMSTaskSequence\sms\bin\x64\TsCore.dll (0x80070005). Continuing. TSManager 9/27/2016 8:29:40 AM 6068 (0x17B4)
Unable to delete file C:\SMSTaskSequence\sms\bin\x64\TsManager.exe (0x80070005). Continuing. TSManager 9/27/2016 8:29:40 AM 6068 (0x17B4)
Unable to delete file C:\SMSTaskSequence\sms\bin\x64\TsMessaging.dll (0x80070005). Continuing. TSManager 9/27/2016 8:29:40 AM 6068 (0x17B4)
Unable to delete directory C:\SMSTaskSequence\sms\bin\x64 (0x80070091).  Continuing. TSManager 9/27/2016 8:29:40 AM 6068 (0x17B4)
Unable to delete directory C:\SMSTaskSequence\sms\bin (0x80070091).  Continuing. TSManager 9/27/2016 8:29:40 AM 6068 (0x17B4)
Unable to delete directory C:\SMSTaskSequence\sms (0x80070091).  Continuing. TSManager 9/27/2016 8:29:40 AM 6068 (0x17B4)
Unable to delete file C:\SMSTaskSequence\TSEnv.dat (0x80070005). Continuing. TSManager 9/27/2016 8:29:40 AM 6068 (0x17B4)
Failed to delete directory 'C:\SMSTaskSequence' TSManager 9/27/2016 8:29:40 AM 6068 (0x17B4)
DeleteFile(B) failed for C:\SMSTaskSequence\sms\bin\x64\CcmCore.dll TSManager 9/27/2016 8:29:40 AM 6068 (0x17B4)
RemoveFile() failed for C:\SMSTaskSequence\sms\bin\x64\CcmCore.dll. 0x80070005. TSManager 9/27/2016 8:29:40 AM 6068 (0x17B4)
DeleteFile(B) failed for C:\SMSTaskSequence\sms\bin\x64\CcmUtilLib.dll TSManager 9/27/2016 8:29:40 AM 6068 (0x17B4)
RemoveFile() failed for C:\SMSTaskSequence\sms\bin\x64\CcmUtilLib.dll. 0x80070005. TSManager 9/27/2016 8:29:40 AM 6068 (0x17B4)
DeleteFile(B) failed for C:\SMSTaskSequence\sms\bin\x64\msvcp120.dll TSManager 9/27/2016 8:29:40 AM 6068 (0x17B4)
RemoveFile() failed for C:\SMSTaskSequence\sms\bin\x64\msvcp120.dll. 0x80070005. TSManager 9/27/2016 8:29:40 AM 6068 (0x17B4)
DeleteFile(B) failed for C:\SMSTaskSequence\sms\bin\x64\msvcr120.dll TSManager 9/27/2016 8:29:40 AM 6068 (0x17B4)
RemoveFile() failed for C:\SMSTaskSequence\sms\bin\x64\msvcr120.dll. 0x80070005. TSManager 9/27/2016 8:29:40 AM 6068 (0x17B4)
DeleteFile(B) failed for C:\SMSTaskSequence\sms\bin\x64\TsCore.dll TSManager 9/27/2016 8:29:40 AM 6068 (0x17B4)
RemoveFile() failed for C:\SMSTaskSequence\sms\bin\x64\TsCore.dll. 0x80070005. TSManager 9/27/2016 8:29:40 AM 6068 (0x17B4)
DeleteFile(B) failed for C:\SMSTaskSequence\sms\bin\x64\TsManager.exe TSManager 9/27/2016 8:29:40 AM 6068 (0x17B4)
RemoveFile() failed for C:\SMSTaskSequence\sms\bin\x64\TsManager.exe. 0x80070005. TSManager 9/27/2016 8:29:40 AM 6068 (0x17B4)
DeleteFile(B) failed for C:\SMSTaskSequence\sms\bin\x64\TsMessaging.dll TSManager 9/27/2016 8:29:40 AM 6068 (0x17B4)
RemoveFile() failed for C:\SMSTaskSequence\sms\bin\x64\TsMessaging.dll. 0x80070005. TSManager 9/27/2016 8:29:40 AM 6068 (0x17B4)
RemoveDirectoryW failed (0x80070091) for C:\SMSTaskSequence\sms\bin\x64 TSManager 9/27/2016 8:29:40 AM 6068 (0x17B4)
RemoveDirectoryW failed (0x80070091) for C:\SMSTaskSequence\sms\bin TSManager 9/27/2016 8:29:40 AM 6068 (0x17B4)
RemoveDirectoryW failed (0x80070091) for C:\SMSTaskSequence\sms TSManager 9/27/2016 8:29:40 AM 6068 (0x17B4)
SetNamedSecurityInfo() failed. TSManager 9/27/2016 8:29:40 AM 6068 (0x17B4)
SetObjectOwner() failed. 0x80070005. TSManager 9/27/2016 8:29:40 AM 6068 (0x17B4)
RemoveFile() failed for C:\SMSTaskSequence\TSEnv.dat. 0x80070005. TSManager 9/27/2016 8:29:40 AM 6068 (0x17B4)
RemoveDirectoryW failed (0x80070091) for C:\SMSTaskSequence TSManager 9/27/2016 8:29:40 AM 6068 (0x17B4)
Deleting volume ID file C:\SMSTSVolumeID.7159644d-f741-45d5-ab29-0ad8aa4771ca ... TSManager 9/27/2016 8:29:40 AM 6068 (0x17B4)
Successfully unregistered Task Sequencing Environment COM Interface. TSManager 9/27/2016 8:29:40 AM 6068 (0x17B4)
Missing TS Progress UI executable C:\SMSTaskSequence\sms\bin\x64\TsProgressUI.exe. TSManager 9/27/2016 8:29:40 AM 6068 (0x17B4)
RegQueryValueExW is unsuccessful for Software\Microsoft\SMS\Task Sequence, SMSTSEndProgram TSManager 9/27/2016 8:29:40 AM 6068 (0x17B4)
GetTsRegValue() is unsuccessful. 0x80070002. TSManager 9/27/2016 8:29:40 AM 6068 (0x17B4)
End program: TSManager 9/27/2016 8:29:40 AM 6068 (0x17B4)
Error executing Task Sequence Manager service. Code 0x80004005 TSManager 9/27/2016 8:29:40 AM 6068 (0x17B4)
Sending error status message TSManager 9/27/2016 8:29:40 AM 6068 (0x17B4)
Do not send status message in full media case TSManager 9/27/2016 8:29:40 AM 6068 (0x17B4)
Successfully finalized logs to SMS client log directory from C:\Users\TEST2~1.DES\AppData\Local\Temp TSManager 9/27/2016 8:29:40 AM 6068 (0x17B4)