ZTIApplications.wsf Always Returns Success RRS feed

  • Question

  • Currently I'm trying to deploy Windows 10 x64 for some of our workstations. In our task sequence we have a bunch of Applications to be installed. However I noticed something when testing.

    If I force an Application (in this case the "Application" calls a Batch script which will just return with Exit /B 3) to fail, I see that ZTIApplications.wsf will Log the Error properly in BDD.log. However, immediately after it states that it states that "ZTIApplications processing completed successfully. " and  "Command completed, return code = 0".

    What this means, is that my deployment will firstly continue on to the next task thinking it was successful. And then the end result is that a Final Summary page is shown saying "SUCCESS" but also stating "During the deployment process, 1 errors and 0 warnings were reported...", which is obviously a false positive.

    So my question is:
    -Is this expected behaviour?
    -If this is expected behaviour, is this documented anywhere? I don't see anything related to this
    -Are there any workarounds? Currently I'm thinking of running my Applications as Command Line tasks instead, since these seem to properly detect errors

    Below is a log snippet for example. I made a custom task sequence which only runs my one Application, which is forced to be a failure (trimmed out time stamps, and thread so it's easier to read). Currently we were using MDT 2013 Update 1. However during this investigation I installed MDT 2013 Update 2. I see the issue in both cases:


    Microsoft Deployment Toolkit version: 6.3.8330.1000	ZTIApplications
    The task sequencer log is located at C:\Users\ADMINI~1\AppData\Local\Temp\SMSTSLog\SMSTS.LOG.  For task sequence failures, please consult this log.	ZTIApplications
    Language/Locale Identified (in order of precedence): 1033,0409,0x0409,9,0009,0x0009	ZTIApplications
    Mandatory Single Application install indicated. Guid: {fb6ae709-9e4d-40b7-9f3a-f1a5a6f64274}	ZTIApplications
    ################	ZTIApplications
    Entry: {fb6ae709-9e4d-40b7-9f3a-f1a5a6f64274}	ZTIApplications
    Name:  Pason Core Applications	ZTIApplications
    ################	ZTIApplications
    Using a local or mapped drive, no connection is required.	ZTIApplications
    ZTI installing application 	ZTIApplications
    About to run command: E:\Deploy\Tools\X64\bddrun.exe Install-Applications.bat	ZTIApplications
    Command has been started (process ID 8980)	ZTIApplications
    ZTI Heartbeat: command has been running for 0 minutes (process ID 8980)	ZTIApplications
    Return code from command = 3	ZTIApplications
    Application Pason Core Applications returned an unexpected return code: 3	ZTIApplications
    Property InstalledApplications001 is now = {fb6ae709-9e4d-40b7-9f3a-f1a5a6f64274}	ZTIApplications
    ZTIApplications processing completed successfully.	ZTIApplications
    Command completed, return code = 0	LiteTouch
    LTI deployment completed successfully	LiteTouch
    Property RetVal is now = 0	LiteTouch


    Wednesday, March 2, 2016 9:12 PM

All replies

  • I made a post with a code adjustment to ZTI_Applications.wsf that aborts the task sequence if an application exits non-successfully.

    Tuesday, May 17, 2016 7:18 PM
  • Only drawing on my experience, this is expected.  When you launch an application install from the Install Applications task using a batch file,  I BELIEVE what happens is that the "return code = 0" refers to the fact that the batch file ran to completion, not that the installation it is calling ran or not.  For this reason, I have tried to minimize using batch files to launch application installs when using the Install Application task.
    Tuesday, May 17, 2016 7:53 PM