Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Normally when I log in to Windows Vista I have several network drives that automatically get mapped. Every so often this fails. Is there a way I can triggering mapping all these drives without logging out and back in?

share|improve this question
Are you logging in to a domain on a network, or just a local standalone system? – Majenko Mar 15 '11 at 15:07
up vote 4 down vote accepted

I can think of two fairly simple methods to accomplish this the first, and easiest, is to get a copy of the bat file from your administrator it is probably on the domain controller under \localhost\netlogon. I know we often give out these out to users if they connect to the office from a VPN. As long as the admin was smart enough to add "net use drive: /delete" you can just double click it and it will remap the drives. If you happen to know the path of the drive and the credentials you can just disconnect the current drive with the X through it, right click my computer and select map network drive to do this. Obviously the batch file will be much easier to use if you do know the path. So I will give you quick run down of how to map a drive via bat file:

Start by opening a blank Notepad document and type these two lines where drive is the letter you want the drive assigned to, computer is the IP address\friendly name of the computer the share is on and path is the name of the share:

net use *drive*: /delete
net use *drive*: \\*computer*\*path* /USER:*domain*\*user* *password* /persistent:yes

Save the file as whatever.bat> go to file> save as>filename.bat

share|improve this answer

Create a .bat file containing all your remap commands, such as :

net use z: \\computer\folder

The ones that are already mapped will fail in a non-fatal way, meaning that only the ones that are unmapped will get remapped.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.