For computers running Windows Server® 2003 or Windows® XP, Immediate Task preference items allow you to create tasks to be run immediately upon the refresh of Group Policy—and then removed. Immediate Task preference items do not provide a selection of actions because they always create a task and then delete it after it has run.

Configuring an Immediate Task (Windows XP) item

To create a new Immediate Task preference item
  1. Open the Group Policy Management Console. Right-click the Group Policy object (GPO) that should contain the new preference item, and then click Edit.

  2. In the console tree under Computer Configuration or User Configuration, expand the Preferences folder, and then expand the Control Panel Settings folder.

  3. Right-click the Scheduled Tasks node, point to New, and select Immediate Task (Windows XP).

  4. In the New Immediate Task (Windows XP) Properties dialog box, enter task settings for Group Policy to configure or remove. (For more information, see "Task settings" in this topic.)

  5. Click the Settings tab, and enter any additional task settings for Group Policy to configure. (For more information, see "Other immediate task settings" in this topic.)

  6. Click the Common tab, configure any options, and then type your comments in the Description box. (For more information, see Configure Common Options.)

  7. Click OK. The new preference item appears in the details pane.

Task settings

Note

All text fields accept preference processing variables. Press F3 to display a list of variables from which you can select.

Name

Type a name for the immediate task. This name will appear in the list of immediate tasks in the Control Panel for users or computers. Preference items configuring tasks with the same task name can conflict.

Run

Type the command to be run, not including any arguments.

Arguments

Type any command-line arguments required.

Start in

To specify the working directory for the command being run (typically to ensure the correct resolution of any relative file names), type the working directory used for the task when launched. Do not include quotation marks or a trailing slash.

Comments

Type a description of the task. This description is visible for users or computers to which this preference item is applied.

Run as

Configure the security context under which the task is run.

  • If the preference item is part of Computer Configuration, by default the task is run in the security context of the SYSTEM account.

  • If the preference item is part of User Configuration, by default the task is run in the security context of the logged-on user. The task is run only if the user is logged on to the computer, but can continue after the user logs off.

  • To run a task under the security context of a specified account (enabling the task to run regardless of whether that account is logged on), select the Run as check box and enter credentials for the account.

Security Note

This password is stored as part of the GPO in SYSVOL and is discoverable, although obscured. If you choose to store passwords in preference items, you should consider creating dedicated accounts for this purpose, and never store administrative passwords in preference items.

Other immediate task settings

On the Settings tab, configure settings to manage the behavior of the task upon completion, if the computer is in use, or under specific power conditions.

Additional considerations

  • You can use item-level targeting to change the scope of preference items.

  • Preference items are available only in domain-based GPOs.

Additional references


Table Of Contents