Login Scripts
Implementing the Login Script in a Domain

Once you have finished testing the script and you are happy with the results, you need to implement it. This is a two or three stage process - depending on your environment.

  1. Copy the script, plus any additional executables (such as "ifmember") that you use in the script to the login script share on your primary domain controller. The location for this will vary depending on whether you are using a Windows NT 4.0 domain controller or Windows 2000 domain controller.
    This information presumes that you have installed Windows on the C: drive in the default locations.
    Windows NT 4.0 DC c:\winnt\system32\repl\export\scripts
    Windows 2000/2003 DC* c:\windows\sysvol\sysvol\<domain name>\scripts

    You can also check the location of the scripts directory by issuing the following command at a Command Prompt
    "net share netlogon" (minus the quotes).

    * includes Small Business Server variants.

  2. If you have more than one domain controller, wait for the script to replicate to all of them, or force replication.
  3. Change the user's settings to use the login script. This should be done for the domain in Domain User Manager or Active Directory User and Computers. Just enter the login script name, as you did during testing. For example, enter "login.bat" not "c:\login.bat".

Implementing via Group Policy

If you are in a Windows 2000 environment with Active Directory domain you can also implement the login script via the Group Policy. This would allow you to have different scripts for different OUs. You can also have logoff scripts which run when a user logs out of their machine.
However if you are suing logoff scripts, it might be a good idea to include the logoff section in the first part of your login script in case the logoff script didn't run correctly or the user failed to logout (power failure etc).

After copying the script in to the location as indicated above and waiting for replication to complete, you will need to change your group policy.
The settings you need to adjust you will find in "User Configuration", Windows Settings, Scripts. There are also other settings in Group Policy that you can adjust that will affect how a login script works (making it visible while running, synchronous or asynchronous etc). These are at "User Configuration", "Administrative Templates", "System", "Scripts".
More details on the Group Policy can be found here.

You may also use these same settings if you are on a standalone machine or in a workgroup and are using a local script. However for this configuration you would edit the "Local Group Policy".

Top of the Page - Home Page
Last Page Update: 28/03/2015

Copyright Sembee Ltd. 1998 - 2024.

Reproduction of any content on this web site is prohibited without express written consent. Use of this web site is subject to our terms and conditions.

All trademarks and registered trademarks are property of their respective owners. This site is not endorsed or recommended by any company or organisation mentioned within and is to provide guidance only and as such we cannot be held responsible for any consequences of following the advice given.

Sembee Ltd. is registered in England and Wales at 1 Carnegie Road, Newbury, Berkshire, RG14 5DJ.
Registered company number: 4704428. VAT Number GB 904 5603 43.

Server 1