Definitive solution to network connect at startup

techdragon84

New Member
Messages
2
Hi All,

below is tried and tested solution for error
could not reconnect all network drives



do as below to resolve the issue.

Step 1 Make sure you disconnect all you network drives prior to this [tutorial here]
Step 2 Open elevated command prompt [tutorial here]
Step 3 run the below command to create a batch to be run at startup.

notepad %USERPROFILE%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\netconnect.bat

Step 4 type net use command as shown below to connect as many network drives as you like.

@echo off
net use [devicename] [\\computername\sharename[\volume] [password] [/user:] /persistent:{yes | no}]

for example
lets say i have a volume by name Seagate4TB on nas with ip xxx.xxx.xxx.xxx and user name used to connect network drive is blahuser and password is blahpass then the command will be as below. you can add as many network drives as you like, just keep adding to the batch file .

net use z: \\xxx.xxx.xxx.xxx\Seagate4TB blahpass /user:blahuser /p:no

Step 5 save notepad and exit.

Next time you restart network drive would have connected automatically.

Advanced users.

if you donot want any popup command prompt at login
in other works if want to run this batch in invisible mode do the following

create a .vbs script to invoke the batch file. place this .vbs in startup folder.
make sure you replace the folder path with your own location where the batch file is palced.

MapNetworkDrives.vbs
Set myShell = CreateObject("WScript.Shell")
myShell.Run chr(34) & "%USERPROFILE%\netconnect.bat" & Chr(34), 0
 
Last edited by a moderator:

My Computer

System One

  • OS
    Windows 8.1 64bit
    Computer type
    Laptop
Back
Top