Share via


Appendix D: Editing the Task Sequence

To edit a build’s task sequence, complete the following steps:

  1. In the Deployment Workbench console tree, click Builds.

  2. In the details pane, right-click the build to edit, and then click Properties.

  3. Click the Task Sequence tab, shown in Figure 10, edit the task sequence as described in Table 14, and then click OK.

    Note   For more information about settings on the Properties and Options tabs, see the sections “Properties” and “Options” in this appendix.

    Figure 10. Task Sequence tab

    Figure 10. Task Sequence tab

Table 14. Editing the Task Sequence

To

Complete these steps

Add a group

In the task sequence, select the item beneath which a new group will be created, and then click Add, Group. Deployment Workbench creates and selects a new group called New Group.

Add a task

In the task sequence, select the item beneath which a new task will be created, and then click Add, Task. Deployment Workbench creates and selects a new task called New Task.

Add a reboot

In the task sequence, select the item beneath which a reboot will be added, and then click Add, Reboot. Deployment Workbench creates and selects a new task that restarts the destination computer.

Note   A reboot is an ordinary task that runs the command smsboot.exe /target:HD to restart the computer and continue the task sequence.

Add an application

In the task sequence, select the item beneath which an application installation will be added, and then click Add, Application, Application, where Application is the name of the application to be installed. Deployment Workbench creates and selects an installation task for the application using the information provided when adding the application to the distribution share.

Note   An application is an ordinary task that runs the command specified when the application is added to the distribution share.

Edit a group, task, reboot, or application

In the task sequence, select the item to edit, and then edit the settings in the right pane.

Remove a group, task, reboot, or application

In the task sequence, select the item to remove, and then click Remove. If a group is removed, Deployment Workbench removes the group and everything it contains, including subgroups and tasks.

Reorder a group, task, reboot, or application

In the task sequence, select the item to reorder, and then click Up or Down to change its position within the task sequence.

On This Page

Properties Properties
Options Options

Properties

Each group and task has a name and description that can be edited on the Properties tab. Tasks also have a Command Prompt window and a starting folder location that can be edited:

  • Name. In the Name box, type a short, descriptive name for the group or task. During deployment, this name appears in the Task Sequencer’s status window.

  • Description. In the Description box, type a description of the group or task.

  • Command line (tasks only). In the Command line box, type the command to run at this step in the task sequence. Include any command-line arguments. Environment variables are also permitted in command lines.

  • Start in (tasks only). In the Start in box, type the path in which to start the command. This path specifies the current working directory for the command. If no path is provided in this box, the paths in the Command line box must be fully qualified or the command must be in the path.

Options

Groups and tasks have the following settings on the Options tab, shown in Figure 11:

  • Disable this step. Select the Disable this step check box to disable the task or group, including all groups and tasks it contains. Clear the Disable this step check box to enable the task or group.

  • Success codes (Tasks only). List the return codes that indicate successful completion.

  • Continue on error. Select the Continue on error check box to continue with the next step in the task sequence if an error occurs in the current task. Clear the Continue on error check box to stop processing the task sequence and instead log the error and display an error message.

    Figure 11. Options tab

    Figure 11. Options tab

Additionally, on the Options tab, Computer Imaging System feature team members can filter the group or tasks based on conditions specified in the Conditions list. If the condition evaluates to TRUE, the group or task runs. If the condition evaluates to FALSE, the group (and all of the groups and tasks it contains) or task does not run. See the sections “Task Sequence Variables” and “If Statements” in this appendix for more information about the Conditions list.

Task Sequence Variables

Task sequence variables allow Computer Imaging System feature team members to compare a variable to a static value using a variety of conditions, such as equal, greater than, and less than. The Task Sequencer maintains numerous variables that can be used in these tests. For example, the Task Sequencer defines a variable called DeploymentMethod that indicates the method of deployment. One possible value of DeploymentMethod is OSD. For a list of variables that the Task Sequencer maintains, see the Configuration Reference.

To add a variable to the Conditions list

  1. On the Options tab, click Add, Task Sequence Variables to display the Task Sequence Variable Condition dialog box shown in Figure 12.

    Figure 12. Task Sequence Variable dialog box

    Figure 12. Task Sequence Variable dialog box

  2. In the Variable box, type the name of the variable to test.

  3. In the Condition list, choose one of the following conditions:

    • exists

    • equals

    • not equals

    • greater than

    • greater than or equals

    • less than

    • less than or equals

  4. In the Value box, type the value to which to compare the variable using the condition specified in the previous step.

If Statements

Use if statements to combine variables into bigger expressions. For example, create an if statement that evaluates to TRUE only if all the conditions it contains are true (this is the same as a logical and). Create an if statement that evaluates to TRUE if any of the conditions it contains are true (this is the same as a logical or).

To add an if statement to the Conditions list

  1. On the Options tab, click Add, If statement to display the If Statement Properties dialog box shown in Figure 13.

    Figure 13. If Statement Properties dialog box

    Figure 13. If Statement Properties dialog box

  2. In the If Statement Properties dialog box, choose one of the following options, and then click OK:

    • All conditions (and)

    • Any conditions (or)

    • None

  3. In the Conditions list, select the if statement added in the previous step, and add task sequence variables to it.

    If All conditions was chosen in the previous step, all variables added must evaluate to TRUE for the group or task to run. If Any conditions was chosen in the previous step, the group or task will run if any one of the variables added evaluates to TRUE.

Nest if statements to create complex logic. If Boolean logic is familiar, represent Boolean expressions as if statements in the Conditions list. For example, the expression (A=1 and B=2) or (C=2 and D=3) can be represented in the Conditions list as shown in Figure 14.

Figure 14. Complex logic in the Conditions list

Figure 14. Complex logic in the Conditions list

Operating System Versions

The Task Sequencer allows Computer Imaging System feature team members to filter tasks and groups based on the computer’s current operating system. For example, run a preinstallation task only if the destination computer is currently running Windows XP Professional SP2.

To add an operating system filter to the Conditions list

  1. On the Options tab, click Add, Operating System Version to display the Task Sequence OS Condition dialog box.

  2. In the Architecture list, click either X86 or X64.

  3. In the Operating system list, choose an operating system version and service pack level.

  4. In the Condition list, choose one of the following conditions:

    • equals

    • not equals

    • greater than

    • greater than or equals

    • less than

    • less than or equals

WMI Queries

The Task Sequencer allows Computer Imaging System feature team members to filter tasks and groups based on WMI queries.

To add a WMI query to the Conditions list

  1. On the Options tab, click Add, Query WMI to display the Task Sequence WMI Condition dialog box.

  2. In the WMI namespace box, type the WMI namespace in which to run the query. The default namespace is root\cimv2.

  3. In the WQL query box, type the WMI query.

Download

Get the Microsoft Solution Accelerator for Business Desktop Deployment 2007

Update Notifications

Sign up to learn about updates and new releases

Feedback

Send us your comments or suggestions