Bat file to map drive Question

Dell Precision 360
May 27, 2008 at 15:41:20
Specs: XP Pro SP2, 3GB RAM

In event of a new installation, for any number of reasons, I currently must create the same five mapped drives on each of our 10 workstations, and would like to automate that with a batch file.

Is it necessary to use the user name to map drives with a batch file?

I saw this example in a previous thread:

NET USE X: \\Beowulf\MyShare /USER:%username%

I'm wondering if all I need is this:

NET USE Z: \\Servername\Myfolder


See More: Bat file to map drive Question

Report •


#1
May 27, 2008 at 16:09:32

If you didn't care which drive letters were used, you could cut out yet another character.
net use * \\Servername\Myfolder


Report •

#2
May 27, 2008 at 17:06:49

If there is a user on the destination server with the same username and password as the user you are currently logged in as, then there is no need to add the /USER option.

Report •

#3
May 27, 2008 at 21:56:18

Thanks for the replies.

A clarification is in order I suppose.

Yes, the drive letters matter. The drive letters must each correspond to the same shared folders on the server, and they must match on each each workstation. This batch file will save me trying to remember all of the designated drive letters, and what folders they map to. It should be as easy as pulling a batch file off the server, and running it on the workstation.

As this is just a client to client network, including the server, and the designated folders destined for mapped drives are shared with no restrictions, this means that no one really needs to log in to the server as long as the permissions are set.

So I tried this batch file out on my workstation today, and even with the time spent writing the batch file, I think that's the quickest I've ever created these five mapped drives... I wish I'd done this years ago...

Thanks again.


Report •

Related Solutions


Ask Question