OK, so for example you have three workgroups : A, B and C.
Workgroup A is mapped to \\SERVER\FOLDER_A$
Workgroup B is mapped to \\SERVER\FOLDER_B$
Workgroup C is mapped to \\SERVER\FOLDER_C$
Workgroup A is mapped as F:
Workgroup B is mapped as G:
Workgroup C is mapped as H:
Set up some groups in User Manager For Domains, for example:
WORKGROUP_A
WORKGROUP_B
WORKGROUP_C
Give each workgroup permissions to the corresponding folder\share.
In the new logon script, use something along the lines of:
:WORKGROUP_A
ifmember WORKGROUP_A
if not errorlevel 1 goto WORKGROUP_B
ECHO Mapping WORKGROUP_A...
IF EXIST F:\NUL NET USE F: /DELETE > NUL
NET USE F: \\SERVER\FOLDER_A$ /PERSISTENT:NO > NUL
goto NEXT
:WORKGROUP_B
ifmember WORKGROUP_B
if not errorlevel 1 goto WORKGROUP_C
ECHO Mapping WORKGROUP_B...
IF EXIST G:\NUL NET USE G: /DELETE > NUL
NET USE G: \\SERVER\FOLDER_B$ /PERSISTENT:NO > NUL
goto NEXT
:WORKGROUP_C
ifmember WORKGROUP_C
if not errorlevel 1 goto NEXT
ECHO Mapping WORKGROUP_C...
IF EXIST H:\NUL NET USE H: /DELETE > NUL
NET USE H: \\SERVER\FOLDER_C$ /PERSISTENT:NO > NUL
goto NEXT
:NEXT
NEXT PART OF YOUR SCRIPT...
END
So this would set up a logon script for three workgroups. If you want someone to get the F drive, put them in Workgroup_A, if you want someone to get the G drive, put them into Workgroup B etc.
Another useful thing if you want to map someone a drive but it going to be a one off is to use:
REM Mapping USERNAME Z: Drive To Whatever Drive
if %username%==USERNAME NET USE Z: \\SERVER\SHARE$ /persistent:no > nul
Longest reply ever!
Let me know of this helps...