Skip to content

How To Solve The Problem Of Always Having To Log On To A Network Drive In Windows

April 21, 2011

If you try to map a network drive in Windows, and use different user credentials, you’ll realise that you’ll need to always type in the username and password every single session. If you shut down your computer everyday, that means you’ll need to do this on a daily basis.

This is horrible too, if you have programs that automatically try to connect to your network drive, as it’ll most likely just fail.

The official solution from Microsoft is to make sure your user credentials on your local computer matches with that of the network drive that you’re trying to connect to. However, that’s hardly practical and probable in real-life.

The following solution is a simple line of code that you can save as a batch file that when run, creates a drive (Z: in this case) and automatically logs in for you. Set it to run whenever you log in by placing this batch file in your Start Menu/Startup folder.

net use Z: “\\\yourfolder” PASSWORD /USER:”yourusername” /PERSISTENT:YES

Note: You’ll have to disconnect your existing drives and make sure that the drive letter isn’t being in use for this batch file to work properly.

Related Posts.