Overview of Logon, Logoff, Startup, and Shutdown Scripts in Windows 2000

Article translations Article translations
Article ID: 198642 - View products that this article applies to.
This article was previously published under Q198642
Notice
This article applies to Windows 2000. Support for Windows 2000 ends on July 13, 2010. The Windows 2000 End-of-Support Solution Center is a starting point for planning your migration strategy from Windows 2000. For more information see the Microsoft Support Lifecycle Policy.
Expand all | Collapse all

SUMMARY

This article describes the scripts that are available in Windows 2000. It provides an overview of the logon scripts that you can assign to individual users in Computer Management and the user logon, user logoff, computer startup, and computer shutdown scripts that you can configure by using Group Policy.

MORE INFORMATION

To remain compatible with earlier versions, Windows 2000 keeps the logon script that is used in Microsoft Windows NT 4.0, in which logon scripts are assigned to individual user accounts. You assign a logon script to an individual user account when you type the path to the logon script file in the Login script box of the Profile tab in the UserName Properties dialog box in Computer Management. When a user logs on and a path to the logon script for the user account appears, the server locates and runs the script. Note that the entry in the Logon script box specifies only the file name (and optionally the relative path) of the logon script. The actual logon script is located on the server.

Windows also provides a set of policy-driven user logon, user logoff, computer startup, and computer shutdown scripts that you can manage by using the Group Policy snap-in. These scripts apply to all the users and computers for which a particular Group Policy object applies. The Group Policy snap-in 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. To configure the computer startup and shutdown scripts, start the Group Policy snap-in, expand Computer Configuration, expand Windows Settings, click Scripts (Startup/Shutdown), and then in the right pane, double-click the script that you want to configure. 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. To configure the user logon and logoff scripts, start the Group Policy snap-in, expand User Configuration, expand Windows Settings, click Scripts (Logon/Logoff), and then in the right pane double-click the script that you want to configure. These scripts run on the User account and not on the Administrator account.
Windows 2000 includes Windows Script Host (WSH), and therefore these scripts use WSH. This means that you can run the script when you click it on the Windows desktop or when you type the name of the script at the command prompt, and then press ENTER. WSH is a language-independent scripting host that includes support for Microsoft Visual Basic Scripting Edition (VBScript) and JScript scripting engines.

For additional information about how to assign user logon, user logoff, computer startup, and computer shutdown scripts by using Group Policy, click the following article number to view the article in the Microsoft Knowledge Base:
322241 HOW TO: Assign Scripts in Windows 2000
For additional information about Group Policy in Windows 2000, visit the following Microsoft Web site and view the Group Policy section:
http://technet.microsoft.com/en-us/windowsserver/2000/bb735347.aspx
For more information about Windows Script Host, visit the following Microsoft Web site:
188135 Description of Windows Script Host (WSH)

Properties

Article ID: 198642 - Last Review: May 24, 2012 - Revision: 2.0
APPLIES TO
  • Microsoft Windows 2000 Advanced Server
  • Microsoft Windows 2000 Server
Keywords: 
kbinfo KB198642

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com