Computing.Net > Forums > Programming > Bat file to map drive Question

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Bat file to map drive Question

Reply to Message Icon

Name: WkEndHacker
Date: May 27, 2008 at 15:41:20 Pacific
OS: XP Pro SP2
CPU/Ram: 3GB RAM
Product: Dell Precision 360
Comment:

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



Sponsored Link
Ads by Google

Response Number 1
Name: Razor2.3
Date: May 27, 2008 at 16:09:32 Pacific
Reply:

If you didn't care which drive letters were used, you could cut out yet another character.

net use * \\Servername\Myfolder


0

Response Number 2
Name: klint
Date: May 27, 2008 at 17:06:49 Pacific
Reply:

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.


0

Response Number 3
Name: WkEndHacker
Date: May 27, 2008 at 21:56:18 Pacific
Reply:

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.


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: Bat file to map drive Question

Bat file to check for file with current date www.computing.net/answers/programming/bat-file-to-check-for-file-with-current-date/18823.html

BAT file to open multiple windows www.computing.net/answers/programming/bat-file-to-open-multiple-windows/7513.html

Running multiple bat files www.computing.net/answers/programming/running-multiple-bat-files/18997.html