Microsoft KB Archive/322241

= How to assign scripts in Windows 2000 =

Article ID: 322241

Article Last Modified on 11/1/2006

-

APPLIES TO


 * Microsoft Windows 2000 Server
 * Microsoft Windows 2000 Advanced Server

-



This article was previously published under Q322241



IN THIS TASK
SUMMARY
 * How to Assign User Logon Scripts
 * How to Assign User Logoff Scripts
 * How to Assign Computer Startup Scripts
 * How to Assign Computer Shutdown Scripts



SUMMARY
This step-by-step article describes how to assign scripts in a Windows 2000 environment. You must be a member of the Administrators group on a computer that is running Windows 2000 Advanced Server to perform the tasks that are described in this article.

Group Policy includes the following two extensions for script deployment:
 * Scripts - Startup/Shutdown: Use this extension to specify the scripts that run when you start and shut down the computer. This extension is located under the Computer Configuration node. These scripts run on the Local System account.
 * Scripts - Logon/Logoff. Use this extension to specify the scripts that run when a user logs on or logs off the computer. This extension is located under the User Configuration node. These scripts are run on the User account, and not on the Administrator account.

back to the top

How to Assign User Logon Scripts
 Open the Group Policy snap-in. In the console tree, go the following location:

Policy/User Configuration/Windows Settings/Scripts (Logon/Logoff)

 Click Scripts, and then double-click Logon in the right pane. Click Add. Configure any of the following settings that you want to use, and then click OK:  Script Name: Type the path to the script or click Browse to locate the script file. By default, logon scripts are created in the following location on the domain controller:

%SystemRoot%\SYSVOL\sysvol\\Policies\<GUID>\USER\Scripts\Logon

</li> Script Parameters: Type any parameters that you want to use in the same way that you type them on the command line. For example, if the script includes the //logo parameter (display banner) and the //i parameter (interactive mode) parameters, type the following text:

//logo //i

</li></ul> </li> In the Logon dialog box, configure any of the following settings that you want to use: <ul> Logon Scripts for: This box lists all of the scripts that are currently assigned to the selected Group Policy object. If you assign multiple scripts, the scripts are processed according to the order that you specify. To move a script in the list, click the script, and then click either Up or Down.</li> Add: Click Add to specify any additional scripts that you want to use.</li> Edit: Click Edit to modify script information such as the name and parameters.</li> Remove: Click Remove to remove the selected script from the Logon Scripts list.</li> Show Files: Click Show Files to view the script files that are stored in the selected Group Policy object.</li></ul>

NOTE: Logon scripts are run on the User account and not on the Administrator account.</li></ol>

back to the top

How to Assign User Logoff Scripts
<ol> Open the Group Policy snap-in.</li> In the console tree, go the following location:

Policy/User Configuration/Windows Settings/Scripts (Logon/Logoff)

</li> Click Scripts, and then double-click Logoff in the right pane.</li> Click Add.</li> Configure the settings that you want to use, and then click OK: <ul> Script Name: Type the path to the script or click Browse to locate the script file. By default, logoff scripts are created in the following location on the domain controller:

%SystemRoot%\SYSVOL\sysvol\<DOMAIN>\Policies\<GUID>\USER\Scripts\Logoff

</li> Script Parameters: Type any parameters that you want to use in the same way that you type them on the command line. For example, if the script includes the //logo parameter (display banner) and the //i parameter (interactive mode) parameters, type the following text:

//logo //i

</li></ul> </li> In the Logoff dialog box, configure any of the following settings that you want to use: <ul> Logoff Scripts for: This box lists all of the scripts that are currently assigned to the selected Group Policy object. If you assign multiple scripts, the scripts are processed according to the order that you specify. To move a script in the list, click the script, and then click either Up or Down.</li> <li>Add: Click Add to specify any additional scripts that you want to use.</li> <li>Edit: Click Edit to modify script information such as the name and parameters.</li> <li>Remove: Click Remove to remove the selected script from the Logoff Scripts list.</li> <li>Show Files: Click Show Files to view the script files stored in the selected Group Policy object.</li></ul>

Note: Logoff scripts are run as User, not Administrator.</li></ol>

back to the top

How to Assign Computer Startup Scripts
<ol> <li>Open the Group Policy snap-in.</li> <li>In the console tree, go the following location:

Policy/Computer Configuration/Windows Settings/Scripts (Startup/Shutdown)

</li> <li>Click Scripts, and then double-click Startup in the right pane.</li> <li>Click Add.</li> <li>Configure any of the following settings that you want to use, and then click OK: <ul> <li>Script Name: Type the path to the script or click Browse to locate the script file. By default, the Startup script is located in the following location on the domain controller:

%SystemRoot%\SYSVOL\sysvol\<DOMAIN>\Policies\<GUID>\MACHINE\Scripts\Startup

</li> <li>Script Parameters: Type any parameters that you want to use in the same way that you type them on the command line. For example, if the script includes the //logo parameter (display banner) and the //i parameter (interactive mode) parameters, type the following text:

//logo //i

</li></ul> </li> <li>In the Startup dialog box, configure any of the following settings that you want to use: <ul> <li>Startup Scripts for: This box lists all of the scripts that are currently assigned to the selected Group Policy object. If you assign multiple scripts, the scripts are processed according to the order that you specify. To move a script in the list, click the script, and then click either Up or Down.</li> <li>Add: Click Add to specify any additional scripts that you want to use.</li> <li>Edit: Click Edit to modify script information such as the name and parameters.</li> <li>Remove: Click Remove to remove the selected script from the Startup Scripts list.</li> <li>Show Files: Click Show Files to view the script files stored in the selected Group Policy object.</li></ul>

NOTE: Startup scripts are run on the Local System account.</li></ol>

back to the top

How to Assign Computer Shutdown Scripts
<ol> <li>Open the Group Policy snap-in.</li> <li>In the console tree, go the following location:

Policy/Computer Configuration/Windows Settings/Scripts (Startup/Shutdown)

</li> <li>Click Scripts, and then double-click Shutdown in the right pane.</li> <li>Click Add.</li> <li>Configure any of the following settings that you want to use, and then click OK: <ul> <li>Script Name: Type the path to the script or click Browse to locate the script file. By default, the Shutdown script is located in the following location on the domain controller:

%SystemRoot%\SYSVOL\sysvol\<DOMAIN>\Policies\<GUID>\MACHINE\Scripts\Shutdown

</li> <li>Script Parameters: Type any parameters that you want to use in the same way that you type them on the command line. For example, if the script includes the //logo parameter (display banner) and the //i parameter (interactive mode) parameters, type the following text:

//logo //i

</li></ul> </li> <li>In the Shutdown dialog box, configure any of the following settings that you want to use: <ul> <li>Shutdown Scripts for: This box lists all of the scripts that are currently assigned to the selected Group Policy object. If you assign multiple scripts, the scripts are processed according to the order that you specify. To move a script in the list, click the script, and then click either Up or Down.</li> <li>Add: Click Add to specify any additional scripts that you want to use.</li> <li>Edit: Click Edit to modify script information such as the name and parameters.</li> <li>Remove: Click Remove to remove the selected script from the Shutdown Scripts list.</li> <li>Show Files: Click Show Files to view the script files stored in the selected Group Policy object.</li></ul>

NOTE: Shutdown scripts are run on the Local System account.</li></ol>

back to the top

Keywords: kbhowto kbhowtomaster KB322241

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.