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!

How can I create login scripts to remap network drives? 1

Status
Not open for further replies.

Trudster

MIS
Mar 12, 2003
4
US
We are in the process of moving our network servers from California to Florida. The whole company relies on mapped shared drives on the server currently located in California and we need to remap the drives on each computer in order for the users to access the new server shared drives that will be in Florida. The drives might not be mapped to the same drive letter across the different facilities around the country. We would like to be able to do this as painless as possible and not even have the users notice anything has changed.
I know that this is possible as I used to do this at another company that I worked for. I just can't remember the exact wording.

Any help would be gladly appreciated!!!

Thank you
 
Exact wording for mapping drives is:

net use z: \\servername\sharename

e.g. NET USE Z: \\CALIFORNIA\FLORIDA$

Where 'z' is the drive letter you want to use.

At a command prompt, type net use /? for a help list.

Regards
 
Another question regarding this mapping:

Would all of the mappings need to be entered into this log in script even though they are not changing?

There are only a few changing but others are the same.
Thanks in advance!!

Trudster
 
How are the drives mapped currently? (eg, if there is not already a login script doing the mapping, have they all been mapped 'manually' on each machine, ticking the save mapping box? If this is the case, you could probably do with removing the mappings which are going to be replaced, before mapping the new locations. Note: you can use net use to remove mappings too, though I'm not sure when manually saved mappings take effect - before or after login script runs. Unchanging mappings don't need specifying, if they've been set other than by login script - but it might be an idea to put all the mappings in the one script to make future support easier).

Best thing is probably to try out test script on test machine that is 'typical' of current set up, until it looks ok.
 
you may need to disconnect current drive mapping before running the above command.

i.e.

net use z: /d

That should decrease any problems caused by users already having that drive letter mapped.
 
In our logon script, we have

ECHO Mapping Z Drive...
IF EXIST Z:\NUL NET USE Z: /D > NUL
NET USE Z: \\SERVERNAME\SHARENAME > NUL

The > NUL bit just stops the batch file from displaying them lines when the logon script runs...we think it looks untidy and opt for the ECHO Mapping Z Drive... bit instead.

Regards
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top