Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

map network drive script command

Status
Not open for further replies.

alexs0628

MIS
Mar 25, 2002
82
US
Does anyone know the command for mapping a network drive, base on what group a person is a member of, for a Win2k server?

Thanks for any help.
 
You can assign a different logon script to each members depending on their group.
 
Hello Alex,

If I am not wrong, I think you can specify the settings in the group policies.

Cheers,
libroos
 
If you wanted to go back to using a login script (bat file). That's no problemo.
Using individual login scripts is easy to config on small networks or if you only have a few shares.
You will need to find a exe called ifmember to run this. It can be found on the NT resource CD or internet.
Have included a little bit of script to help you out

REM disconnect network drives
NET USE I: /DELETE
NET USE H: /DELETE


REM map network drives
ifmember FIRSTGROUP
If not errorlevel 1 goto SECONDGROUP
net use H: \\SERVERNAME\SHARENAME

:SECONDGROUP
ifmember SECONDGROUP
If not errorlevel 1 goto FINISH
net use I: \\SERVERNAME\SHARENAME

:FINISH
EXIT

It gets quite funky as you can assign a group to a PC and even map your printers..

Hebiebug
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top