How to remap network drives without logging in again?

10,891

Solution 1

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

Solution 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.

Share:
10,891
Rob Mosher
Author by

Rob Mosher

Updated on September 17, 2022

Comments

  • Rob Mosher
    Rob Mosher over 1 year

    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?

    • FJ de Brienne
      FJ de Brienne about 13 years
      Are you logging in to a domain on a network, or just a local standalone system?