Sysprep and Capture Task Sequence failed in MDT 2013

Last week i decide to Capture a fresh installation of Windows Server 2012 R2 with Last Windows Updates and Antivirus. Because It takes me lot of time every time that must be install new Server. 

The configuration to capture Windows Server 2012 in MDT 2013 it's ready. I have explain step by step in How to Capture Windows Image using MDT 2013 how can do it. So i start the proccess to capturing the Windows Server 2012 R2.

Suddenly After 5 minutes i get an error and the Capturing Stopped. The error was 

<<Details … 
ZTI ERROR - Unhandled error returned by LTIApply: Not found (-2147217406 0x80041002)
Litetouch deployment failed, Return Code = -2147467259 0x80004005 
Failed to run the action: Apply Windows PE.
Not found (Error: 80041002; Source: WMI) 
The execution of the group (Capture Image) has failed and the execution has been aborted.
An action failed.
Operation aborted (Error: 80004004; Source: Windows)
Failed to run the last action: Apply Windows PE. Execution of task sequence failed.
Not found (Error: 80041002; Source: WMI)
Task Sequence Engine failed! Code: enExecutionFail 
Task sequence execution failed with error code 80004005
Error Task Sequence Manaqer failed to execute task sequence. Code 0x80004005??

Open BDD.Log file for more details and see the following errors.If you arem't familiar with MDT 2013 and Logs read the article Enable Deployment Logs for Troubleshooting in MDT 2013 to understand how can enable and where found Logs to troubleshoot easier the errors.

The error in image it's the following:

Return code from command = 0    LTIApply    6/27/2016 7:28:34 AM    0 (0x0000)
About to run command: takeown.exe /F "C:\boot" /R /A /D Y    LTIApply    6/27/2016 7:28:34 AM    0 (0x0000)
Command has been started (process ID 2792)    LTIApply    6/27/2016 7:28:34 AM    0 (0x0000)
Return code from command = 1    LTIApply    6/27/2016 7:28:34 AM    0 (0x0000)
ResetFolder: TakeOwn for C:\boot, RC = 1    LTIApply    6/27/2016 7:28:34 AM    0 (0x0000)
ZTI ERROR - Unhandled error returned by LTIApply: Not found  (-2147217406  0x80041002)    LTIApply    6/27/2016 7:28:34 AM    0 (0x0000)
Event 41002 sent: ZTI ERROR - Unhandled error returned by LTIApply: Not found  (-2147217406  0x80041002)    LTIApply    6/27/2016 7:28:35 AM    0 (0x0000)
Command completed, return code = -2147467259    LiteTouch    6/27/2016 7:28:35 AM    0 (0x0000)
Litetouch deployment failed, Return Code = -2147467259  0x80004005    LiteTouch    6/27/2016 7:28:35 AM    0 (0x0000)


Why? I have use Capture with SysPrep in MDT 2013 lot of times with Windows 7 and Windows Server 2008. I check my configuration in MDT 2013 for errors but nothing. I try again again and the result was the same.

I start a research to find why this happened and after hour i found why MDT 2013 behaviour with this way when you try to capture Windows Server 2012.

Base on Microsoft in this error happened because <<  LTIApply.wsf script fails to check for the existence of the boot folder on the system partition before the script runs the takeown.exe command to change ownership on the folder. The takeown.execommand fails with a "Not Found" error if the boot folder doesn't exist. This causes the Sysprep and Capture task sequence to fail.>>

The error applies to Windows 8,8.1 and Windows Server 2012,

To resolve this error follow the steps

  • Open C:\Program files\Microsoft Deployment Toolkit\Templates\Distribution\Scripts\ from the Server which has install MDT 2013
  • Find and open  the file LTIApply.wsf

  • Locate the Copy bootmgr and in the next line copy the following line
    If not oFSO.FolderExists(sBootDrive & "\Boot") then oFSO.CreateFolder(sBootDrive & "\Boot") End if

  • Save the file and start again to Capture the Windows Server 2012 R2,
  • The Capture will be complete successfull without errors.

Of course the behaviour will be different for every user and maybe has to face another errors. 

Now it's your turn to tell us for your errors that face in Capturing or Deployment with MDT 2013. You can share through our commenting system and learn from them. Try it now.

Have a nice weekend!!


Disqus Comments