I have the following script to determine user's group membership when they logon:
Set wshNet = CreateObject("WScript.Netw
ork")
Set ADSysInfo = CreateObject("ADSystemInfo
")
Set CurrentUser = GetObject("LDAP://" & ADSysInfo.UserName)
colGroups = CurrentUser.MemberOf
strGroups = LCase(Join(colGroups))
.........
if InStr(strGroups, HR) then
...................
end if
The script runs fine when I log on as administrator to the computer. However, when I log on as a regular user, I got an error saying "Type mismatch: 'Join', code 800A000D". Anyone knows how to correct it?
Thanks,
Start Free Trial