Creating an Execute Task
Note This content applies to the Windows Logo Kit (WLK). For the latest information using the new Windows Hardware Certification Kit (HCK), see Windows HCK User's Guide on the Windows Hardware Dev Center.
Tasks perform the work of a job. An Execute task is the most common type of task and is used to execute any command that you could type at the command prompt. For more information about tasks, see Basic Task Concepts.
To define an Execute task
Note This content applies to the Windows Logo Kit (WLK). For the latest information using the new Windows Hardware Certification Kit (HCK), see Windows HCK User's Guide on the Windows Hardware Dev Center.
Create or edit an Execute task within a job.
For some tasks, it might be acceptable for the task to eventually succeed, even if the task does not succeed the first time it is run. For example, it might be appropriate to retry a task that uses an unstable network connection.
If this task should be rerun when it fails, provide the following information:
In the On failure, retry the task x times box, type the number of times that the task should be rerun. If the task has not passed after it has been run this many times, the task will fail.
In the at an interval of x seconds box, type the number of seconds that should elapse before the task is rerun.
In the Add Task Details dialog box on the Execute tab, type the command that should be executed when the task is run.
Note To pass parameters from the job to the task and use these parameters within the command, see Using Parameters.
If this task requires a command shell to run, select the Create new command shell for this task check box. If you do not select the Create new command shell for this task check box, the task will be run from the Windows environment and will not be able to access environment variables.
Tip If the command line contains an MS-DOS command, executes a batch script, or requires environment variables, then it probably requires a command shell to run.
Select the Check this to fail the task if it does not reboot the machine check box if you expect the client computer to reboot when this task runs. If the client computer reboots while running this task, and you did not select this check box, then the task will fail. If the client computer does not reboot and you did select this check box, then the task will also fail.
If this task's completion status should affect the completion status of the job, select Rollup Results to Job. If you do not roll the task's results up to the job, then if the task fails, it will not cause the job to fail.
To run the task from a specific directory, select the Use the following directory option and enter the path to the directory that the task should run in. If you accept the default of Use the jobs working directory, the task will run from a temporary directory that will be deleted when the job completes.
If the task should stop automatically after a specific amount of time, on the Execution Options tab, select Set timeout to, type the number of days, hours, and minutes after which you want to cancel the task, and then select Cancel task and declare failure if the task is still running (task timeout).
If the task is still running after the specified amount of time, the task will fail.
If the task should still be running after a specific amount of time, on the Execution Options tab, select Set timeout to, enter the number of days, hours, and minutes after which you want to check whether the test is still running, and then select Declare failure if the task stops before the timeout (infinite task).
If the task is not running after the specified amount of time, the task will fail.
If you want this task to run at the beginning of the phase, and other tasks to run immediately after this task starts running, then select This task will be running in the beginning of the execution phase in the Daemon Task section of the Execution Options tab.
If you want this task to run at the end of the phase, after all of the other tasks have finished running, select This task will be running in the end of the execution phase in the Daemon Task section of the Execution Options tab.
Note DTM will reorder the list of tasks on the Tasks tab of the New Job window and place all daemon tasks at the beginning of the list. Daemon tasks do not affect the order that non-daemon tasks run, regardless of whether you selected parallel, sequential, or custom task execution.
In the User Context section of the Execution Options tab, select the user context and session that will be used to run the task on the client computer, and then select one of the following options:
Run in System Context to run in the system context (also called "session zero" or "console") on the client computer. There is no desktop associated with the system context, and therefore no display. Services commonly run in the system context.
Run as the user that is logged onto the first active session to run in the context of the user that is logged on to the first active session on the client computer. If no user is logged on to the client computer, the task will fail.
Run as user in user's active session to run as a specific user, if that user is logged on to the client computer. If the user is not logged on, the task will fail.
Run as user in Console if logged in to run as a specific user if that user is logged on to the client computer. However, the task will run in session zero, rather than in the user's session. If the user is not logged on, the task will fail.
Run as user in Console even if not logged in to run as a specific user in session zero, even if the user is logged on to the client computer.
If you selected Run as user in user's active session, Run as user in Console if logged in, or Run as user in Console even if not logged in, use the following procedure to identify the user:
In the User Credentials section of the Execution Options tab, select Run as Specific User to identify the user by user name, or select Run as Local Logical User to identify the user by using a Local Logical User (LLU).
If you selected Run as Specific User, enter the user name and domain of the user to run as. If the User Context is Run as user in Console even if not logged in, also enter the user's password.
Important The password is stored on the controller and is not secure.
If you selected Run as Local Logical User, enter the LLU as the Local Name.
Click OK to return to the New Job window.
Build date: 9/14/2012