Quote:
Code:
DIM $strShareRoot, $IntNoUnits, $arrUnit, $arrShare, $arrDrive, $intNextDrive, $intUnit
$strShareRoot = "\\Server\"
$arrUnit = "_Prod", "_HR", "_AP", "_APSecr", "_FA", "Helpdesk", "_PZ", "_Dir"
$arrShare = "Prod$", "HR$", "AP$", "AP$", "Fin$", "IT$", "PZ$", "Dir$"
$arrDrive = "U:", "V:", "W:", "X:", "Y:", "Z:"
$FriendlyName = "U share", "V Share", "W Share", "X Share", "Y Share", "Z Share"
For $intUnit = 0 To ubound($arrUnit)
If InGroup($arrUnit[$intUnit])
Use $arrDrive[$intUnit] $strShareRoot + $arrShare[$intUnit]
label($arrDrive[$intUnit],$FriendlyName[$intUnit])
EndIf
next
Joeel, with this code the Z is first mapped, and no other share is mapped although I am member of more unit groups.
Originally the first letter to be used is the U, then if the user is member of another group, map the next letter from the array i.e. V to the appropriate share.
Any ideas why no more mappings are made ?
Thanks..