VB error

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
 
T

Tim Springston \(MSFT\)

Hi Sergey-

Please post this to microsoft.public.windows.server.scripting instead.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top