Okay here goes...
Currently we reorganising out folder structure on our file srevers so that the follow convention is ahered to:

Shared folder
|
|-Organisation 1
| |-Department 1
| | |-Departmental folders
| |-Department 2
| |-Departmental folders
|-Organisation 2
|-Department 1
| |-Departmental folders
|-Department 2
|-Departmental folders

Department global groups have been created to apply to each resource (can't use DLG's as still in Mixed mode) so that each department folder can only be accessed by their repsective departments. The standard convention is that shared folder mappings use the S: drive.

However, and this is were I get a headache...

One particular organisation historically accessed multiple deparmental folders. So we have allocated 4 drive letters for use with shared folders S:, N:, O:, and T: - I swear I didn't pick these!

One of our techs wrote a script so that should a user be a member of multiple groups it would map more than one drive. But the script was just a list of Ingroup statements that had no structure and users would end up 2 or drive mappings to the same locations because one person in the department accessed more than one share.
So I have written the below script which works on my test network. However and this is where I am stumped. Because historically the default shared drives where mapped to the s: I want to carry this on. When my script runs it enumerated the groups that a use is in and then assigns one of the available drive letters whether it be S:, N:, O: or T:. If there was a way to get KIX to enumerate a users group membership in the same order as shown in AD U&C then I could put the primary froup at the top of the membership list and this would following in the script enumeration and would be assigned as S:. I know this sounds complicated, here is what I have come up with so far:

CLS
DIM $Index
DIM $DriveIndex
DIM $NextDrive
Dim $Temp
GLOBAL $Group[40]
$Index = 0
DO
$Group[$Index]=0
$Index=$Index+1
UNTIL $Index=40
$Index=0
DO
$Group[$Index] = ENUMGROUP($Index)
$Index = $Index + 1
UNTIL Len($Group[$Index]) = 0
$DriveIndex = 0
$Index = 0
DO
SELECT
CASE $DriveIndex = "0"
$NextDrive = "S:"
CASE $DriveIndex = "1"
$NextDrive = "N:"
CASE $DriveIndex = "2"
$NextDrive = "O:"
CASE $DriveIndex = "3"
$NextDrive = "T:"
ENDSELECT
$Temp = $Group[$Index]
IF $Temp = "HOME\gRPCTDept1" USE $NextDrive "\\hmdc01\shared\rpct\Department 1" $DriveIndex = $DriveIndex + 1 ENDIF
IF $Temp = "HOME\gRPCTDept2" USE $NextDrive "\\hmdc01\shared\rpct\Department 2" $DriveIndex = $DriveIndex + 1 ENDIF
IF $Temp = "Home\gRPCTDept3" USE $NextDrive "\\hmdc01\shared\rpct\Department 3" $DriveIndex = $DriveIndex + 1 ENDIF
$Index = $Index + 1
UNTIL ($DriveIndex = 4) OR ($Index = 40) OR ($Temp = 0)