Batch File to Map Network Drives

Status
Not open for further replies.

electricvoices

Posts: 11   +0
Can anyone give me the script on how to map network drives through a batch file that starts up & runs automatically when windows initiates?

I have 2 drives that I need to map, both of which are on my home network...

Any help would be AWESOME!!!
 
Windows XP (and probably 2000) have an option to "reconnect on login" when you create the network drive. Is this something that would work for you?

I know you can use the NET USE command to map network drives, but I don't have much experience with it since I've never really needed it. Check out this page for more details: http://msmvps.com/blogs/kwsupport/archive/2004/11/03/17830.aspx

1. First thing you want to do is to make a backup copy of the .bat file - just in case!

2. Next, edit the contents of the default .bat file so it looks like this, and then save it.

Rem Default SBS Login Script for users
\\sbs1\netlogon\%username%.BAT

3. I then created a new .bat file for each user. The name of the .bat file explicitly matched their actual logon name. So, if you logged on as JohnDoe, then the batch file was named JohnDoe.bat

Here is the content of one such user batch file:

Rem Batch File for user John Doe
NET USE Q: \\sbs1\Quickbooks
NET USE S: \\sbs1\SharedCompany
NET USE T: \\sbs1\Access

If youre using Windows Me, 98 or something else, then things might get sticky.... :)
 
I seriously can't beleive i wasted the time to post this... i totally forgot about the "reconnect on login"... yea that would save a little time! Thanks though!
 
Status
Not open for further replies.
Back