Thinking about this and your later post, you probably want to use alternate logic.. I use something like this in my "Universal Login Script", which you can download from my site, although the logic would have to be modified slightly for your situation.

 Code:
$OK = 0
; User should be a member of at least one group in the following list
; Define array of group names and share subfolders
$Groups = 'group1','group2','group3'
$Shares = 'dir1', 'dir2', 'dir3'
For Each Group in $Groups
  $OK = $OK + InGroup($Group)
Next

; map a drive if $OK is true
If $OK
  ; but map to the root if $OK is >1 (member of multiple groups
  If $OK > 1
    Use T: '\\server\root'
  Else
    For $I = 0 to UBound($Groups)
      If Ingroup($Groups[$I])
        Use T: '\\server\root\' + $Shares[$I]
      EndIf
    Next
  EndIf
EndIf



This maps T: to the root of the share if the user is a member of 2 or more groups in the list, and to the corresponding subfolder (deep map) if they are a member of only one group.

Glenn




Edited by Glenn Barnas (2007-07-09 03:57 PM)
Edit Reason: typo
_________________________
Actually I am a Rocket Scientist! \:D