I usually do not recommend using the WinNT provider. It is slower and reveals fewer Active Directory attributes. It is also blind to the hierarchy of Active Directory. It does not recognize Organizational Units or nested domain groups. However, some people like it because you don't need to deal with Distinguished Names. It also is easier to reveal the "Primary Group" of users and computers.

This VBScript logon script uses the WinNT provider. It demonstrates the use of an efficient IsMember function to test for group membership. The IsMember function does not reveal membership in nested groups. However, it does reveal membership in the "Primary Group". The IsMember function uses a dictionary object, so that group memberships only have to be enumerated once, no matter how many times the function is called.

The logon script incorporates a loop to retrieve the UserName from the wshNetwork object. This loop is only necessary on Windows 95/98 clients during logon. Without it, the wshNetwork object would return a blank string for UserName.

This program should work on any 32-bit Windows client that can log onto the domain. Windows NT and Windows 98/95 clients should have DSClient installed. If DSClient is not installed, WSH and ADSI should be installed.

This logon script demonstrates how to use the IsMember function to map drives to network shares according to user group membership. This script also demonstrates how to map the user home directory specified in Active Directory to the appropriate drive letter. It also demonstrates how to map local ports to shared printers. However, the WinNT provider does not recognize computer group membership. This script maps the same shared printer for all users. It could be modified to map printers according to user group membership.

Logon1.txt <<-- Click here to view or download the program