none
Jumping\skipping to next child TS depending on exit code from an HTA file. RRS feed

  • Question

  • Hi,

    We have created an In-place Upgrade TS.

    The 1st step, displays a welcome HTA with multiple option for the user -like -

     - install the OS,

     - data backup

    - install apps only

    Each of these steps have a specific exit code and each option have a separate TS, which will be nested in the mail TS.

    The problem is - we are looking for option to execute the nested TS based on the exit code of the HTA.

    Example:

    below is the basic structure of the TS

    1.Welcome HTA

    2. Preflight checks

    3. Child TS

        - Install OS

        - data backup

        - install Apps only

    if the user select the option as data backup only, how do we use the exit code to jump directly to that child TS.

    Pls help

    Thursday, August 1, 2019 6:24 AM

All replies

  • The easiest method is to not rely on exit codes of the HTA (because exit codes imply errors) but to instead set a task sequence variable's value based on the choice made. You can then add call nested TS tasks for each possible child task sequence and add a condition to each to check the value of the TS variable so that only the proper call child TS task is actually executed.

    Jason | https://home.configmgrftw.com | @jasonsandys

    Thursday, August 1, 2019 1:54 PM