Tip

Using Group Policy Objects to manage script execution

James Michael Stewart, Contributor

An earlier tip described the group policy object controls used to define the various scripts that are to be run on a system at startup or shutdown and for users at logon and logoff. This tip discusses the controls that manage how those scripts are actually executed.

The computer configuration section of a GPO contains the Administrative Templates/System/Scripts folder that contains the controls for managing computer-focused scripts. This folder contains five controls. To understand how to use these controls, you need to keep in mind one important item: by default scripts execute one after the other in a series in the order defined in the Windows/Scripts section of the GPO.

The Run logon scripts synchronously control forces the system to wait until all logon scripts have fully completed their execution before the Windows Explorer interface launches and presents the desktop to the user. This control is disabled by default, which allows the desktop to start while the logon scripts are concurrently executing. This can result in problems in some instances, especially if the user is able to launch an application that relies upon the results of a logon script (such as mapping network drives) quickly. The control in the computer configuration area manages this feature based on the workstation while the same control in the user configuration area manages this feature based on the user account.

The Run startup scripts asynchronously

    Requires Free Membership to View

control alters the default synchronous or series execution of startup scripts. Instead, it allows all scripts to launch simultaneously and execute concurrently. If you enable this control, be sure that all scripts are fully independent of each other and don't require the completion of one script to support a function within another.

The Run startup scripts visible and Run shutdown scripts visible controls alter the default execution of scripts from being hidden from the user into a scripting-language specific window displaying the execution and results of the script. In most cases, there is no need for users to view the execution of scripts. The Run logon scripts visible and Run logoff scripts visible controls in the User Configuration section performs the same function but for logon/logoff scripts instead of startup/shutdown scripts.

The Maximum wait time for Group Policy scripts control sets the total amount of time scripts can execute before they are terminated by the system and an error event recorded in the System log. By default the system waits 600 seconds (10 minutes).

The User Configuration section of a GPO contains the Administrative Templates/ System/Scripts folder, and this one contains controls for managing user-focused scripts. There are four controls, but three of them are duplicates or alternates to similar controls in the Computer Configuration section discussed earlier.

The Run legacy logon scripts hidden control alters the default execution of legacy scripts in a visible window to being hidden from the user. Legacy logon scripts are those written for Windows NT 4.0 and earlier.


James Michael Stewart is a researcher and writer for Lanwrights, Inc.


This was first published in October 2002

There are Comments. Add yours.

 
TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.