D
daragh
Im using VBscript to write new logon scripts, when i run
the script as any user with domain admin rights it runs
ok, but when Its run by a standard user it fail due to the
join command. i have tried giving the user local admin
rights but thats not working,
Here is a sample of the script, any help would be
appreciated:
Const FINANCE = "cn=finance"
Const HR = "cn=hr"
Set ADSysInfo = CreateObject("ADSystemInfo")
Set CurrentUser = GetObject("LDAP://" & ADSysInfo.UserName)
strGroups = LCase(Join(CurrentUser.MemberOf))
If InStr(strGroups, FINANCE) Then
wshNetwork.MapNetworkDrive "j:", "\\SERVER\FINANCE"
ElseIf InStr(strGroups, HR) Then
wshNetwork.MapNetworkDrive "j:", "\\SERVER\HR"
end if
the script as any user with domain admin rights it runs
ok, but when Its run by a standard user it fail due to the
join command. i have tried giving the user local admin
rights but thats not working,
Here is a sample of the script, any help would be
appreciated:
Const FINANCE = "cn=finance"
Const HR = "cn=hr"
Set ADSysInfo = CreateObject("ADSystemInfo")
Set CurrentUser = GetObject("LDAP://" & ADSysInfo.UserName)
strGroups = LCase(Join(CurrentUser.MemberOf))
If InStr(strGroups, FINANCE) Then
wshNetwork.MapNetworkDrive "j:", "\\SERVER\FINANCE"
ElseIf InStr(strGroups, HR) Then
wshNetwork.MapNetworkDrive "j:", "\\SERVER\HR"
end if