Thanks,
Treve Suazo
Thats what I'm doing now...here....
'Init Groups
Dim UserGroups
Dim GroupObj
UserGroups=""
For Each GroupObj In UserObj.Groups
UserGroups=UserGroups & "[" & GroupObj.Name & "]"
Next
Dim WSHNetwork
Set WSHNetwork = WScript.CreateObject("WScript.Network")
'
If InGroup("Domain Admins") Then
WSHNetwork.MapNetworkDrive "Q:", "\\server\y"
WSHNetwork.MapNetworkDrive "R:", "\\server\z"
End If
'
If InGroup("Domain Users") Then
WSHNetwork.MapNetworkDrive "W:", "\\server\x"
End If
'
If InGroup("Developer") Then
WSHNetwork.MapNetworkDrive "J:", ServiceBru
WSHNetwork.MapNetworkDrive "W:", "\\server\x"
WSHNetwork.MapNetworkDrive "Q:", "\\server\y"
WSHNetwork.MapNetworkDrive "R:", "\\server\z"
End If
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
' Function: Check if user is in Group
' Arguments: Group to check membership of
' Note: Requires pre-initialization of UserGroups variant
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Function InGroup(strGroup)
InGroup=False
If InStr(UserGroups,"[" & strGroup & "]") Then
InGroup=True
LoginMsg strGroup
End If
End Function
"Treve Suazo" <tsu...@misscrit.com> wrote in message
news:#MP0ngru$GA....@cppssbbsa02.microsoft.com...
spence
"Treve Suazo" <tsu...@misscrit.com> wrote in message
news:uRXLLG5u$GA....@cppssbbsa02.microsoft.com...
> If I Cut and Paste this code and make a couple of modifications to
> groupnames within the InGroup Function. Changes to the drive mappings
with
> a valid server name and share name, the code bombs out on line 5 stating
> Error: "Object Required 'UserObj'". I've attached a bmp of the error
> message and was wondering if I'm missing something.
>
> Thanks,
> Treve
>
> "Joe Finley" <jfi...@prcontrol.com> wrote in message
> news:nzkS4.414$6T3....@typhoon.neo.rr.com...
Function InGroup(strGroup)
InGroup=False
Set UserObj = GetObject("WinNT://" & DomainName & "/" & strUserID)
For Each GroupObj In UserObj.Groups
InGroup=InStr(Ucase(GroupObj.Name),Ucase(strGroup)) > 0 or InGroup
Next
End Function
Maurice Childs
MCSE MCP+I
> "Treve Suazo" <tsu...@misscrit.com> wrote in message