On login, how do I get Windows to mount/connect a mapped network drive automatically?

You could try adding on logon via the 'net' command

For example,

net use z: \\server\share

You could get this to start at logon a number of ways - put it in a batch file and add to startup items, add it to task scheduler, or add it to the local group policy are three that come to mind (no doubt there are others)


I generally simply use a batch script which does a "dir" command on that share.

Open Notepad, and enter the following:

dir I:

Replace I with the drive letter you have mapped.

You can also do >nul on the end of that command to hide the output in the command prompt window when it runs.

Click File, then Save As.
Change Save as Type to All Files. Save the file in the C:\Users\username\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup folder and call it mapdrive.bat. Replace username with your own username.

Next time you start your computer it will run this script. It will force windows to connect to the mapped drive.


A simple net use command is all that should be needed. If your network share requires a different username/password, those can be specified too.

net use i: \\server1\Directory3 /persistent:yes

Net Use docs:
http://technet.microsoft.com/en-us/library/bb490717.aspx

I map shares like this all the time without issue. Sometimes it takes a moment or two after logging in for the share to reconnect. It's not always instant.