Difference LTISysprep.wsf vs. sysprep.exe / Second unattend.xml RRS feed

  • Question

  • After having resolved most of my problems concerning system building / OS preinstallation using MDT, I still have issues when it comes to the sysprep part.

    As mentioned above, can anyone explain me the difference between running "LTISysprep.wsf" vs. running a command line "sysprep.exe /generalize /oobe /quiet /quit /shutdown" in detail?

    Though it has taken quite some time to figure out, I have realised that I need a second answer file (unattend.xml) for a correct OOBE experience. That second unattend.xml is specifically designed for the Sysprep process in order to deactivate the local Administrator as well as the AutoLogon behaviour (both needed by MDT during build process).

    For this reason, I have to guide sysprep to that 2nd answer file. If I could incorporate the standard sysprep command, there wouldn't be any problem, as I would just add "/unattend:<Path-to-Unattend002.xml>" to the command.

    When I run this sysprep command in MDT task sequence (regardless of specifying unattend-path or not), however, I always get an error and MDT deployment does not complete successfully; whereas the MDT default way of using "LTISysprep.wsf" will not result in any errors.

    Does LTISysprep.wsf tell MDT when to finish deployment while command-line sysprep does not; thus leaving the MDT deployment wizard in an uncertain state?

    If so, how would I be able to change LTISysprep.wsf to use a different, second unattend.xml for the Sysprep process? So far, LTISysprep.wsf uses the installation unattend.xml (generated by MDT & stored in the task sequence folder), even though I have copied the Sysprep-unattend.xml (file name: "unattend.xml" as it should be) to the directory "%SYSTEMROOT%\System32\Sysprep\" before.

    I would greatly appreciate any thoughts on this!



    Monday, August 22, 2016 4:34 PM

All replies

  • Basically you would have to ask if you run sysprep outside of MDT how would MDT know when you are done etcetera. As far as using a different unattend.xml how did you determine that was required?

    Many questions such as where do I find logs and what logs are interesting are found in: MDT TechNet Forum - FAQ & Getting Started Guide Please take the time to read it. Also if you don't post logs your problem won't be easily solved.

    Monday, August 22, 2016 6:42 PM
  • Thanks for your reply!

    Apparently, I haven't made my issue clear enough. My scenario is the following:

    I preinstall Windows along with certain programs, drivers, updates, configurations on bare-metal PCs. Unfortunately, Microsoft's guide for OS Preinstallation ( ) does everything manually. My employer does not have the time so that we want to automate as much as possible. We use MDT for that.

    The task sequence is "Standard Client TS" to build the OS and subsequently capture a generalized image of the OS to a recovery partition.

    In the first part - the building process - MDT needs an Administrator account to log-on in order to do the online servicing (install applications, configure some settings, etc.). This needed Administrator account will be created during configuration pass 4 "specialize" of Windows Setup.
    Therefore there are entries under "4-specialize" in the install-unattend.xml to create the Administrator account automatically. To be clear, this is the default MDT setting/behaviour!
    So far so good.

    After MDT has build & configured all relevant aspects, I want MDT to hit the second part: Generalize+Capture the image.

    For a correct OOBE, every exisiting user must be removed!

    Sysprep would do that normally. However, after Sysprep has completed, configuration pass "4-specialize" will be executed at the next start up!

    If there is any entry to create user accounts under "4-specialize" (which is the case for the installation unattend.xml), there will NOT be a correct OOBE because the previously defined users are created!

    The unattend.xml used for OS installation must have these entries to be able to log-on and to do online servicing.

    The unattend.xml used for Sysprep must NOT contain any user account-creation nor autologon entries!
    This is why I need a second, different unattend.xml (I call it SysprepUnattend.xml) for Sysprep!
    Such use of a Sysprep-only unattend.xml complies with Microsoft's OEM Imaging guide (stated above) !

    Although this could be easily done by adding "/unattend:<path-to-SysprepUnattend.xml>" to the command line, I cannot execute the usual Sysprep command because then MDT would not know when to finish deployment, thus giving errors in the output.

    On the other hand, no errors will occur if I use the LTISysprep.wsf script. Unfortunately, the script always uses the unattend.xml, which is stored in the TS folder, is being used for OS installation, and contains the user-creation entries under "4-specialize".

    As indicated in the title, my question is: Where is the difference between manual Sysprep command vs. LTISysprep.wsf?
    How to modify LTISysprep.wsf to use a second, Sysprep-specific unattend.xml?



    Tuesday, August 23, 2016 4:23 PM
  • Hey RusselfieldTech,

      I've had this exact same question for months as I'm attempting to accomplish the same task.  Did you find an answer to your question at all?


    Tuesday, November 26, 2019 8:20 PM