i use a similar script to below at a site and works no probs but thios site the groups dont work. i cant change the case in groups as it is existing. i dont want to define constants etc if i dont have too - any help apprecaited - site uses kix just now and i want to move to vbs
on error resume next
Set wshNetwork = CreateObject("WScript.Network")
wshNetwork.MapNetworkDrive "o:", "\\shineyserver\shared"
Set ADSysInfo = CreateObject("ADSystemInfo")
Set CurrentUser = GetObject("LDAP://" & ADSysInfo.UserName)
strGroups = LCase(Join(CurrentUser.getex("MemberOf")))
strComputerName = wshNetwork.ComputerName
If Instr(strGroups, "cn=meadow EGH Ascribe at EGH") Then
WsHNetwork.MapNetworkDrive "l:", "\\egh-ascribe1\live"
End If
If Instr(strGroups, "cn=meadow AAH Ascribe") Then
WsHNetwork.MapNetworkDrive "n:", "\\aah-ascribe2\live"
End If
If InStr(strGroups, "cn=meadow RIE Finance Share") Then
WsHNetwork.MapNetworkDrive "p:", "\\rie-file\FINANCE SHARE"
End If
on error resume next
Set wshNetwork = CreateObject("WScript.Network")
wshNetwork.MapNetworkDrive "o:", "\\shineyserver\shared"
Set ADSysInfo = CreateObject("ADSystemInfo")
Set CurrentUser = GetObject("LDAP://" & ADSysInfo.UserName)
strGroups = LCase(Join(CurrentUser.getex("MemberOf")))
strComputerName = wshNetwork.ComputerName
If Instr(strGroups, "cn=meadow EGH Ascribe at EGH") Then
WsHNetwork.MapNetworkDrive "l:", "\\egh-ascribe1\live"
End If
If Instr(strGroups, "cn=meadow AAH Ascribe") Then
WsHNetwork.MapNetworkDrive "n:", "\\aah-ascribe2\live"
End If
If InStr(strGroups, "cn=meadow RIE Finance Share") Then
WsHNetwork.MapNetworkDrive "p:", "\\rie-file\FINANCE SHARE"
End If