Const UK = "cn=UK"
Const US = "cn=US "
Set ADSysInfo = CreateObject("ADSystemInfo")
Set CurrentUser = GetObject("LDAP://" &
ADSysInfo.UserName)
strGroups = LCase(Join(CurrentUser.MemberOf))
If InStr(strGroups, UK) Then
wshNetwork.MapNetworkDrive "s:",
"\\Server\Shared\"
wshNetwork.MapNetworkDrive "p:",
"\\Server\US Folders Directory"
' UK Scanning Drive
' wshNetwork.MapNetworkDrive "x:",
' "\\x\"
ElseIf InStr(strGroups, US) Then
wshNetwork.MapNetworkDrive "p:",
"\\Server\US Folders Directory"
wshNetwork.MapNetworkDrive "s:",
"\\Server\Shared\"
wshNetwork.MapNetworkDrive "R:",
"\\Server\folder"
End If
Visual Basic is Microsoft’s event-driven programming language and integrated development environment (IDE) for its Component Object Model (COM) programming model. It is relatively easy to learn and use because of its graphical development features and BASIC heritage. It has been replaced with VB.NET, and is very similar to VBA (Visual Basic for Applications), the programming language for the Microsoft Office product line.
TRUSTED BY
ASKER