S
Sergey M.
I am trying to run login script for domain user and
getting vb error "type mistmatch join". The script works
fine under domain admin. Please help. Here is a script
Const HELPDESK = "cn=helpdesk"
Set wshNetwork=CreateObject("Wscript.Network")
set FileSysObj=Wscript.CreateObject
("Scripting.FileSystemObject")
Set ADSysInfo=CreateObject("ADSystemInfo")
Set CurrentUser=GetObject("LDAP://" & ADSysInfo.UserName)
strGroups=LCase(Join(CurrentUser.MemberOf))
If InStr(strGroups, HELPDESK) Then
MapDrive "t:","\\root01\tools"
End If
Function MapDrive(Drive,Share)
If FileSysObj.DriveExists(share)=True then
if FileSysObj.DriveExists(Drive)=True then
WSHNetwork.RemoveNetworkDrive Drive
end if
WSHNetwork.MapNetworkDrive Drive, Share
else
end if
end function
getting vb error "type mistmatch join". The script works
fine under domain admin. Please help. Here is a script
Const HELPDESK = "cn=helpdesk"
Set wshNetwork=CreateObject("Wscript.Network")
set FileSysObj=Wscript.CreateObject
("Scripting.FileSystemObject")
Set ADSysInfo=CreateObject("ADSystemInfo")
Set CurrentUser=GetObject("LDAP://" & ADSysInfo.UserName)
strGroups=LCase(Join(CurrentUser.MemberOf))
If InStr(strGroups, HELPDESK) Then
MapDrive "t:","\\root01\tools"
End If
Function MapDrive(Drive,Share)
If FileSysObj.DriveExists(share)=True then
if FileSysObj.DriveExists(Drive)=True then
WSHNetwork.RemoveNetworkDrive Drive
end if
WSHNetwork.MapNetworkDrive Drive, Share
else
end if
end function