terry712MemberJanuary 8, 2005 at 3:23 am #101103
ok i’m starting to play with 2003 on a remote site i have that has to run a ms environment due to some proprietary dbase they run
the server is in ok and dns , dhcp etc are all fine
im ok with the rights and all that kind of stuff and i want to
tie everything down with groups
i have a script configured in the gpo (simple one – cut and pasted from ms site but i get an error on line 8 saying type mismatch: “join”
line 8 is – strGroups = LCase(Join(CurrentUser.MemberOf))
i’ve only tried this on one pc – it’s 2000 with sp4 – the home drive maps no probs
the script is
Const typing = “cn=typing”
Set wshNetwork = CreateObject(“WScript.Network”)
wshNetwork.MapNetworkDrive “h:”, “\nemesishome” & wshNetwork.UserName
Set ADSysInfo = CreateObject(“ADSystemInfo”)
Set CurrentUser = GetObject(“LDAP://” & ADSysInfo.UserName)
strGroups = LCase(Join(CurrentUser.MemberOf))
If InStr(strGroups, typing) Then
wshNetwork.MapNetworkDrive “g:”, “\nemesistyping”
ElseIf InStr(strGroups, FINANCE_GROUP) Then
wshNetwork.MapNetworkDrive “g:”, “\FileServerFinance”
ElseIf InStr(strGroups, HUMAN_RESOURCES_GROUP) Then
wshNetwork.MapNetworkDrive “g:”, “\FileServerHuman Resources”
can anyone tell me what is wrong with this – i’m afraid i’m a netware guy so my vbs scripting knowledge is nill – afraid i was allways crap at programming
yanivfelMemberJanuary 9, 2005 at 10:55 am #221377
not a vb expert
but it seems to me that u didnt’ solid with capital and const commands of all your groups, which is important but not sure that is the cause for mailfunction…
Const FINANCE_GROUP = “cn=finance”
Const HUMAN_RESOURCES_GROUP = “cn=human resources”
the only thing i can think of is that the group name that is in the script is wrong or doesnot mach the SAMAccountName of the group you are trying to check….
tonyyebMemberJanuary 18, 2005 at 1:49 pm #222022
Well i just ran the script on my PC and it worked fine. Do you have the latest version of the Windows Scripting Host installed (v5.6)?
tonyyebMemberJanuary 19, 2005 at 1:37 am #222023
Hmmm funny, did he say it was NT4? I thought he said it was 2003 and tested from a Win2k workstation? What OS are you trying this script on?
You must be logged in to reply to this topic.