I thought it might be a good idea to use an array to store all my drive mappings for each different type of user (based on Group membership) and then use the USE command on each entry using a loop. It's not mapping the drives though and I suspect this is because the drive letter is part of the array value. Is there any way round this (So I can keep the array idea?)

Code is as follows:
Dim $CCentre_Drive[8]
$CCentre_Drive[1] = "I: \\FAIRY\DESSERT"
$CCentre_Drive[2] = "Q: \\IO\XCRIPT"
$CCentre_Drive[3] = "R: \\IO\INTRANET"
$CCentre_Drive[4] = "U: \\CUSTBAK\DATA"
$CCentre_Drive[5] = "V: \\HAL\DATA"
$CCentre_Drive[6] = "X: \\CUSTBAK\DATA"
$CCentre_Drive[7] = "Y: \\HAL\DATA"
$CCentre_Drive[8] = "END"

....

If InGroup("MMGROUP\CCOpsX")=1
$Counter=1
While $CCentre_Drive[$Counter] <> "END"
USE $CCentre_Drive[$Counter]
If @ERROR<>0
$ErrorLine = "Error "+@ERROR+" Mapping : "+$CCentre_Drive[$Counter]
Else
$ErrorLine = "Mapped : "+$CCentre_Drive[$Counter]
Endif
Gosub Write_Error
sleep 1
$Counter = $Counter + 1
Loop
Endif