| |
AzzerShaw
Posts: 25
Score: 0
Joined: 10/22/2004
From:
Status: offline
|
Hi, I am having troubles with running this script Const Printer_Mapping = "cn=U-MAP-P-Server-Share" Const Map_X_Drive = "cn=U-MAP-D-Server-Share-X" Const Printer_Mapping_Default = "cn=U-MAP-P-Server-Share" Set wshNetwork = CreateObject("WScript.Network") wshNetwork.MapNetworkDrive "h:", "\\osys13\Ondemand\" & wshNetwork.UserName Set ADSysInfo = CreateObject("ADSystemInfo") Set CurrentUser = GetObject("LDAP://" & ADSysInfo.UserName) strGroups = LCase(Join(CurrentUser.MemberOf)) If InStr(strGroups, Printer_Mapping) Then wshNetwork.AddWindowsPrinterConnection "\\L-CBSPRN01\L-CBSP001" ElseIf InStr(strGroups, Printer_Mapping_Default) Then wshNetwork.AddWindowsPrinterConnection "\\L-CBSPRN01\L-CBSP002" wshNetWork.SetDefaultPrinter "\\L-CBSPRN01\L-CBSP002" ElseIf InStr(strGroups, Map_X_Drive) Then wshNetwork.MapNetworkDrive "g:", "\\osys10\jetforms\" End If An error message comes up saying Line: 13 Char: 1 Error:Type mismatch: 'join' Code: 800A000D Sourc: M$ VBscript Runtime error Unfortunely this is a sample script so i have no idea what is wrong with it Can someone please tell me what is wrong with it? Thanks Aaron
|
|