Sample VBScript logon scripts. The programs map drive letters to network shares according to user group membership. They map local ports to shared network printers according to computer group membership. The program you select will depend on the following factors - the client operating systems that the logon script must support, whether you plan to just test for user group membership or you also want to test for computer group membership, whether you want to recognize membership in nested groups, and whether you want to recognize membership in the "Primary Group".
A VBScript logon script program that uses a simple IsMember function. Binds to the user object in Active Directory with a loop that is necessary on Windows 95 and Windows 98 clients during logon. Uses the WinNT provider.
A VBScript logon script program that incorporates an IsMember function that recognizes membership in nested groups. Includes the loop required to bind to the user object on Windows 95 and Windows 98 clients during logon. Uses the LDAP provider.
A VBScript logon script program that takes advantage of features in Windows 2000 and above. The IsMember function recognizes membership in nested groups. Not appropriate for Windows 95 or Windows 98 clients. Uses the LDAP provider.
A simple VBScript logon script program that does not use a separate function to test for group membership. Instead, the program uses the group object IsMember method. This requires binding to the group object to be tested for membership. This won't be efficient if many tests are required. Does not reveal membership in nested groups or the "Primary group". Includes the loop required to bind to the user object on Windows 95 and Windows 98 clients during logon.
A VBScript logon, logoff, startup, and shutdown script programs demonstrating how to log information to a log file during logon. A VBScript program is included to parse the resulting log file and output information on user sessions, including logon time, logoff time, and the duration of the session. A similar VBScript program parses the log file for computer startups and shutdowns.
A VBScript logon script program that uses an IsMember function that recognizes membership in nested groups and the primary group. The program uses ADO to retrieve group names making it more efficient if the users are members of many groups. Includes the loop required to retrieve the user name on Windows 95/98 clients during logon.
A VBScript programs to enforce one logon session for each user. A logon script creates a file in a shared folder named after the user and writes a value based on the name of the computer to the file. If this file exists during logon, the user is logged off. A Logoff script deletes the file. Startup and Shutdown scripts delete all files corresponding to the computer from the shared folder. Two other VBScript programs allow an administrator to determine which computer a given user is logged into, or which user is logged into a given computer.
Batch file that launches a VBScript logon script program if the client is a Windows 32-bit operating system. Otherwise, launches a batch file logon script. This batch file can be designated as the logon script for all clients in a network. A program like this is necessary for any clients that are Windows 95, Windows 98, or Windows ME.
Answers to many questions about how to setup logons scripts, how to support various client operating systems, what languages can be used, and how to setup one logon script that will run on any client.
Guidelines and recommendations for coding VBScript logon scripts. Suggestions for the best ways to check group membership.