How to remap network drives without logging in again?

3

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?

Rob Mosher

Posted 2011-03-15T14:51:21.097

Reputation: 203

Are you logging in to a domain on a network, or just a local standalone system? – Majenko – 2011-03-15T15:07:28.300

Answers

4

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

Supercereal

Posted 2011-03-15T14:51:21.097

Reputation: 8 643

2

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.

harrymc

Posted 2011-03-15T14:51:21.097

Reputation: 306 093