I'm looking to map users who belongs to more then one group. Server is 2K and the stations are XP PRO.
In a SELECT statement, only the first true condition will be processed. The flow of the script will then jump to the ENDSELECT statement, and continue. So I used IF INGROUP to search for user's membership and map the drives accordly. Again is mapping the first group of the array or none..any advice and /or good documentation
$Array = "mech", "mech_USR", "super", "test"
If InGroup ($Array, 1) = 1
; Use $Drive /Delete /Persistent
Use H: /DELETE
Use H:"\\anyserver\DATA\HOME\@USERID" /PERSISTENT
$LABELSTATUS.TEXT = "Mapping H: Drive..."
$PROGRESSSTATUS.VALUE = $PROGRESSSTATUS.VALUE + 1
Sleep 2
Use K: /DELETE
Use K: "\\anyserver\mech" /PERSISTENT
$LABELSTATUS.TEXT = "Mapping K: Drive..."
$PROGRESSSTATUS.VALUE = $PROGRESSSTATUS.VALUE + 0.5
Sleep 2
Use T: /DELETE
Use T: "\\anyserver\DATA\TEMP" /PERSISTENT
$LABELSTATUS.TEXT = "Mapping T: Drive..."
$PROGRESSSTATUS.VALUE = $PROGRESSSTATUS.VALUE + 0.5
Sleep 2
Use W: /DELETE
Use W: "\\anyserver\DATA\TEMPLATE" /PERSISTENT
$LABELSTATUS.TEXT = "Mapping W: Drive..."
$PROGRESSSTATUS.VALUE = $PROGRESSSTATUS.VALUE + 0.5
Sleep 2
EndIf
If InGroup("mech_USR") = 1
Use LPT2: "\\anyserver\mech_LASER" /PERSISTENT
If AddPrinterConnection ("\\anyserver\mech_LASER") = 0
SetDefaultPrinter ("\\anyserver\mech_LASER")
$LABELSTATUS.TEXT = "Mech_laser default on LPT2 ..."
EndIf

If InGroup("super") = 1
Use R: "\\anyserver\DATA\ACCNT\super" /PERSISTENT
$LABELSTATUS.TEXT = "Mapping R: Drive..."
$PROGRESSSTATUS.VALUE = $PROGRESSSTATUS.VALUE + 1
Sleep 2
Use LPT3: "\\anyserver\super" /PERSISTENT
EndIf

If InGroup("test")=1
Use P: "\\anyserver\DATA\ACCNT\test" /PERSISTENT
$LABELSTATUS.TEXT = "Mapping P: Drive..."
$PROGRESSSTATUS.VALUE = $PROGRESSSTATUS.VALUE + 1
Sleep 2
EndIf
thanks in advance for your time .