Jump to content


MDT SCCM capture only task sequence ztibackup.wsf error

Recommended Posts

Hi All,

I'm trying to do an image capture without first sysprep'ing the device. (Basically how I used ghost when I wanted to get a backup of a machine)


My task sequence is basically this

restart in win pe

use toolkit package (the mdt toolkit)

set variable ComputerBackupLocation

capture image (%scriptroot%\ztibackup.wsf


Everytime I an error on my capture image step that says 0x00000001. SMSTS.log says failed "incorrect function"


I opened up the share with no change, i added my domain admin account on the capture image step and the error goes to 0x80004005 (i'll have to double check on that code)


My MDT package was created by importing a mdt task sequence into SCCM and that appears to be working properly. I have no errors in my bdd.log


Any ideas?

Share this post

Link to post
Share on other sites

hi, can you post the smsts.log file please ? the incorrect function error could be due to trying to execute the script while in windows instead of doing it in winpe...

Share this post

Link to post
Share on other sites

here's a working task sequence that does what you need:


<?xml version="1.0"?>
<SmsTaskSequencePackage xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
 <Category />
 <DependentProgram />
 <Description />
 <Name>XP Image Capture</Name>
   <sequence version="3.00">
       <reference package="HQ000194" />
     <step type="SMS_TaskSequence_RebootAction" name="Restart Computer" description="" runIn="WinPEandFullOS" successCodeList="0">
       <action>smsboot.exe /target:WinPE</action>
         <variable name="SMSRebootMessage" property="Message">
         <variable name="SMSRebootTimeout" property="MessageTimeout">1</variable>
         <variable name="SMSRebootTarget" property="Target" hidden="true">WinPE</variable>
     <step type="BDD_UsePackage" name="Use Toolkit Package" description="" runIn="WinPEandFullOS" successCodeList="0">
       <action>smsswd.exe /run:HQ000194 cscript.exe Scripts\ZTISCCM.wsf</action>
         <variable name="BDDPackageID" property="PackageID" hidden="true">HQ000194</variable>
     <step type="SMS_TaskSequence_SetVariableAction" name="Set Backup Location Variable" description="" runIn="WinPEandFullOS" successCodeList="0">
       <action>tsenv.exe "ComputerBackupLocation=\\u264\xpbackupimages"</action>
         <variable name="VariableName" property="VariableName" hidden="true">ComputerBackupLocation</variable>
         <variable name="VariableValue" property="VariableValue" hidden="true">\\u264\xpbackupimages</variable>
     <step type="SMS_TaskSequence_SetVariableAction" name="Set WIM FileName Variable" description="" runIn="WinPEandFullOS" successCodeList="0">
       <action>tsenv.exe "BackupFile="</action>
         <variable name="VariableName" property="VariableName" hidden="true">BackupFile</variable>
         <variable name="VariableValue" property="VariableValue" hidden="true">
     <step type="SMS_TaskSequence_RunCommandLineAction" name="Capture Image" description="" runIn="WinPEandFullOS" successCodeList="0 3010">
       <action>smsswd.exe /run: cscript.exe "%scriptroot%\ZTIBackup.wsf"</action>
         <variable name="CommandLine" property="CommandLine" hidden="true">cscript.exe "%scriptroot%\ZTIBackup.wsf"</variable>
         <variable name="SMSTSDisableWow64Redirection" property="DisableWow64Redirection">false</variable>
         <variable name="_SMSTSRunCommandLineAsUser" property="RunAsUser">false</variable>
         <variable name="SuccessCodes" property="SuccessCodes" hidden="true">0 3010</variable>
         <variable name="SMSTSRunCommandLineUserPassword" property="UserPassword">
 <SupportedOperatingSystems />

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...