Discussion Locked

Logon Script Error Message

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I created the following script and I get an error that I can diagnose. Here is the script, logon.vbs:

Const CCI_GROUP = "cn=cci-users"

Set wshNetwork = CreateObject("WScript.Network")
Set ADSysInfo = CreateObject("ADSystemInfo")
Set CurrentUser = GetObject("LDAP://" & ADSysInfo.UserName)
strGroups = LCase(Join(CurrentUser.MemberOf))

If InStr(strGroups, CCI_GROUP) Then

WshNetwork.MapNetworkDrive "g:", "\\myserver\dfsroot\cci\"

End If

Several users (Windows 2000 Pro) get the following error:

Script: \\myserver\sysvol\mydomain\scripts\logon.vbs
Line: 7
Char: 1
Error: Type Mismatch: 'Join'
Code: 800A000D
Source: Microsoft VBScript runtime error

The error message points to the line strGroups = LCase(Join(CurrentUser.MemberOf))
, but I can't figure out what it means.

The script runs fine and the drive is mapped.
Thanks for any ideas.

3 replies

by shdhsn

One of the most frequent reasons for this is incompatible VBS types. This often occurs when passing parameters to object methods.

This discussion is closed to new replies.