Share via


Using Variables within a Job

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.

A task can reference information about the job or about the computer that the job is executing on by using a variable. When the job executes on a client computer, variables are replaced with their values.

Variables can be used in different places for each type of task.

  • In an Execute task, variables can be used within the command line, working directory, log file name, user name, domain, password, and local name.

  • In a Copy File task, variables can be used within the source file name, destination directory, user name, domain, password, and local name.

  • In a Copy Result task, variables can be used within the source file name, destination directory, user name, domain, password, and local name.

  • In a Manual Prompt task, variables can be used within the user name, domain, password, and local name.

  • Variables cannot be used within a Run Job task.

Certain types of variables can also contain references to other variables. For more information about nesting variables, see Using Parameters.

You can use the following types of variables within a task:

DTM creates a variable that corresponds to each dimension. When a job that uses a dimension as a variable is executed, the variable is replaced with the value of the dimension on the client computer. For more information about using dimensions, see Using Dimensions as Variables.

Operating system environment variables can be used within a task. When the task is executed, the variable is replaced with the value of the environment variable on the client computer. For more information about using environment variables, see Using Environment Variables within a Job.

DTM provides information about the context that the job is running in as run-time variables. For more information about using run-time variables, see Using Run-Time Variables.

You can define your own variables, called parameters, and use them to pass values to the tasks in the job. Fore more information about using parameters, see Using Parameters.

To evaluate a variable, enclose the name of the variable in square brackets. For example, the environment variable "[TEMP]" would be replaced with the path to the directory where temporary files are stored when the job that referenced the variable was run. Similarly, the dimension [WTT\machinename] would be replaced with the name of the client computer.

 

 

Build date: 9/14/2012