A new feature of Configuration Manager 2007 R2 is the ability to define a Task Sequence Variable on a Collection or individual resource without a value. Then when the Task Sequence initiates on a system, a dialog box is presented where you can set the value of the variable. A quick example is in order to demonstrate this:

  1. Create a TS. Use the intended variable in a conditional or in any other way that variables can be used. For this example, I simply set a condition on the install of XML Notepad: it will only be installed if the TS variable InstallXMLNotepad is set to Yes.

    image image

  2. Advertise it to a collection.
  3. Set the InstallXMLNotepad variable on the targeted collection but do not defined a value; i.e., leave it blank. To set a variable on a collection, right-click it and choose Modify Collection Settings. The second tab, named Collection Variables, allows you to manage the variables for the collection.


  4. Launch the Task Sequence on a resource in that collection.
  5. Before any tasks are launched, you will be presented with the following dialog box:


  6. Double-click on the variable whose value you want to set (if you have more than one variable with a blank value, they will all be shown in the list box).


  7. Type in the value and press OK.


That’s it. The variable is now set and will be used in the conditional we set in step 1. The major shortcoming is in plain user friendliness: the raw variable name is presented to the user without any type of prompt and you cannot constrain or validate the value entered in any way. But, if your process is well defined and documented, these shortcomings are relatively small.

Note that if you truly want the user running your task sequence to choose software to install, as the above simplistic example shows, check out my OSD Application Chooser. For more complex tasks, using blank task sequence variables may be just the trick though.