| |
hockey2389
Posts: 1
Score: 0
Joined: 2/1/2004
From:
Status: offline
|
I have a login script for a windos 2000 Domain that maps drives based on group membership. It works fine until the user is a memeber of ALL 3 groups in the script, then I get a Type Mismatch on the Join function. The code is below, thanks in advance for your help! Dim wshNetwork, ADSysInfo, CurrentUser Set wshNetwork = CreateObject("WScript.Network") Set ADSysInfo = CreateObject("ADSystemInfo") Set CurrentUser = GetObject("LDAP://" & ADSysInfo.UserName) strGroups = LCase(Join(CurrentUser.MemberOf)) wshNetwork.MapNetworkDrive "S:","\\mmsvr1\shared$" 'wshNetwork.AddWindowsPrinterConnection"\\mmsrv1\Printer" 'wshNetwork.SetDefaultPrinter"\\mmsvr1\Printer" If InStr(strGroups, "cn=shopkey") Then wshNetwork.MapNetworkDrive "R:","\\mmsvr1\shopkey$" End If If InStr(strGroups, "cn=quicken") Then wshNetwork.MapNetworkDrive "Q:","\\mmsvr1\quicken$" End If If InStr(strGroups, "cn=tracker") Then wshNetwork.MapNetworkDrive "T:","\\mmsvr1\tracker$" End If Set wshNetwork = Nothing Set ADSysinfo = Nothing Set CurrentUser = Nothing
|
|