Map Network Drives in Windows 2000 Logon Scripts

In Microsoft Windows 2000, mapping network drives automatically during user sign-in is primarily achieved through Group Policy logon scripts managed within Active Directory, as well as legacy user profile properties. By executing batch files or Windows Script Host (WSH) scripts at login, administrators can automatically connect client workstations to shared network resources across an entire enterprise domain.

Active Directory Group Policy Objects (GPOs)

The core feature introduced in Windows 2000 for managing logon scripts is Group Policy. Administrators configure logon scripts using the Group Policy snap-in within the Microsoft Management Console (MMC). Navigating to User Configuration > Windows Settings > Scripts (Logon/Logoff) allows administrators to assign one or more scripts to the Logon policy. These policies can be targeted precisely at specific sites, domains, or Organizational Units (OUs), ensuring that drive mappings apply automatically to designated users whenever they authenticate.

User Account Profile Configuration

In addition to Group Policy, Windows 2000 supports script assignment directly through Active Directory Users and Computers (ADUC). By opening a user's account properties and navigating to the Profile tab, administrators can enter the name of a script file in the Logon script field. For this method to function, the script must be stored in the domain controller’s shared NETLOGON directory, typically located at %SystemRoot%\SYSVOL\sysvol\<domain_name>\scripts.

Scripting Methods: NET USE and Windows Script Host

The scripts invoked by Windows 2000 use two primary mechanisms to execute the drive mapping:

  • Batch Files (.bat / .cmd): Administrators commonly use traditional batch scripts utilizing the built-in command-line utility net use. A basic command such as net use H: \\server\share /persistent:no assigns a specified network share to a designated drive letter during login.
  • Windows Script Host (VBScript): Windows 2000 natively integrates Windows Script Host, enabling administrators to deploy .vbs files. Using the WScript.Network object, administrators can execute the MapNetworkDrive method, allowing for conditional logic, dynamic user-based mappings, and advanced error handling that standard batch files do not natively support.