How to assign scripts in Windows 2000 (322241)



The information in this article applies to:

  • Microsoft Windows 2000 Server
  • Microsoft Windows 2000 Advanced Server

This article was previously published under Q322241

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

  1. Open the Group Policy snap-in.
  2. In the console tree, go the following location:

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

  3. Click Scripts, and then double-click Logon in the right pane.
  4. Click Add.
  5. 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\<DOMAIN>\Policies\<GUID>\USER\Scripts\Logon

    • 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

  6. In the Logon dialog box, configure any of the following settings that you want to use:
    • 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.
    • Add: Click Add to specify any additional scripts that you want to use.
    • Edit: Click Edit to modify script information such as the name and parameters.
    • Remove: Click Remove to remove the selected script from the Logon Scripts list.
    • Show Files: Click Show Files to view the script files that are stored in the selected Group Policy object.
    NOTE: Logon scripts are run on the User account and not on the Administrator account.
back to the top

How to Assign User Logoff Scripts

  1. Open the Group Policy snap-in.
  2. In the console tree, go the following location:

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

  3. Click Scripts, and then double-click Logoff in the right pane.
  4. Click Add.
  5. Configure the 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, logoff scripts are created in the following location on the domain controller:

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

    • 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

  6. In the Logoff dialog box, configure any of the following settings that you want to use:
    • 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.
    • Add: Click Add to specify any additional scripts that you want to use.
    • Edit: Click Edit to modify script information such as the name and parameters.
    • Remove: Click Remove to remove the selected script from the Logoff Scripts list.
    • Show Files: Click Show Files to view the script files stored in the selected Group Policy object.
    Note: Logoff scripts are run as User, not Administrator.
back to the top

How to Assign Computer Startup Scripts

  1. Open the Group Policy snap-in.
  2. In the console tree, go the following location:

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

  3. Click Scripts, and then double-click Startup in the right pane.
  4. Click Add.
  5. 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, the Startup script is located in the following location on the domain controller:

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

    • 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

  6. In the Startup dialog box, configure any of the following settings that you want to use:
    • 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.
    • Add: Click Add to specify any additional scripts that you want to use.
    • Edit: Click Edit to modify script information such as the name and parameters.
    • Remove: Click Remove to remove the selected script from the Startup Scripts list.
    • Show Files: Click Show Files to view the script files stored in the selected Group Policy object.
    NOTE: Startup scripts are run on the Local System account.
back to the top

How to Assign Computer Shutdown Scripts

  1. Open the Group Policy snap-in.
  2. In the console tree, go the following location:

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

  3. Click Scripts, and then double-click Shutdown in the right pane.
  4. Click Add.
  5. 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, the Shutdown script is located in the following location on the domain controller:

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

    • 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

  6. In the Shutdown dialog box, configure any of the following settings that you want to use:
    • 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.
    • Add: Click Add to specify any additional scripts that you want to use.
    • Edit: Click Edit to modify script information such as the name and parameters.
    • Remove: Click Remove to remove the selected script from the Shutdown Scripts list.
    • Show Files: Click Show Files to view the script files stored in the selected Group Policy object.
    NOTE: Shutdown scripts are run on the Local System account.
back to the top

Modification Type:MinorLast Reviewed:7/15/2004
Keywords:kbhowto kbHOWTOmaster KB322241 kbAudITPro