Windows Error – “Could Not Reconnect All Network Drives”

Windows Error – “Could Not Reconnect All Network Drives”

I am going to assume that you, like me, have already mapped some network drives. That you marked them to reconnect at login and that they are failing to do so. Correcting this issue is a pretty simple process but does require a few steps.

In order to get started we must remove the network drives that we have. You have two choices as to how to do this. The first one and probably the simplest is to delete the mapping to the drives. You can right click them, then select disconnect and then confirm you selection. On one of my systems I also had to delete the drive after doing the above. I then had to confirm this deletion. After doing this your system should only show the system drives on you computer and none of the previously mapped network drives.

The other option is to use the “net use” command from an administrative commond prompt. You would do this for each of the drive letters that you have assigned. As an example if you had mapped a network drive to G: the command would be
Net Use G: /delete (Note: there is a space between the Drive Letter: and /delete)

Once we have made sure that our drives are no longer mapped or will be disconnected at reboot we can move on. Now we need to create a batch file that will reconnect our drives each time we log on to our computer. I used WordPad to do this and saved it as a batch (.bat) file. It should look like this and is dependent on how many drives you want to map. In my case I had 5 drives that I wanted to map. I also included timeout /t 2 to give a brief delay to allow time for the drive to connect and the /persistent:NO command to make sure that the drives would not remain whenever I logged off.

@echo off
Set delay=30
ping localhost -n %delay%
net use V: \\Server Name\Books /user:UserName UserPW /persistent:NO
timeout /t 2
net use W: \\Server Name\Pictures /user:UserName UserPW /persistent:NO
timeout /t 2
net use X: \\Server Name\Music /user:UserName UserPW /persistent:NO
timeout /t 2
net use Y: \\Server Name\Videos /user:UserName UserPW /persistent:NO
timeout /t 2
net use Z: \\Server Name\Laptop /user:UserName UserPW /persistent:NO
timeout /t 2

(Note: there is a space between the Drive Letter: and \\ and a space after the “Share Name” – in this case Pictures, Music, etc.)

You need to save this in your documents folder with the name Netlogon.bat.

Now for where to put this file so that it will run automatically. This really depends on if you mind seeing the command prompt window or prefer not to see it on your screen. If you don’t mind seeing it then follow the set of steps under A), if you prefer not to see it the follow those under B).

A)

1. For this step you will have to go into the Control Panel to make a change so you can see all of the directories on you system. Open the control panel, go to “Folder Options”, then go to “View” and mark the radio button to “Show hidden files, folders and drives. You can change this back when you are done.

2. Go to your documents folder and copy the Netlogon.bat

3. Now open up “Computer” and select your C drive

4. Go to Users and select your user ID (probably your name)

5. Ultimately you will need to go to this subdirectory:
C:\users\”Your Folder”\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup

6. Paste your Netlogon.bat file in this directory

7. Close any windows you have open

8. Reboot your system. Once Windows starts you will see the Command Prompt window pop up your batch file will run. It will take a little over 30 seconds to complete but when it does all of your drives should be correctly mapped and will do so everytime you reboot.

B)

1. For this step you will have to go into the Control Panel to make a change so you can see all of the directories on you system. Open the control panel, go to “Folder Options”, then go to “View” and mark the radio button to “Show hidden files, folders and drives. You can change this back when you are done.

2. Leave the Netlogon.bat file in your documents folder (in my case I made a subfolder called ReadyNAS and copied it to that folder.

3. Now open up “Computer” and select your C drive

4. Go to Users and select your user ID (probably your name)

5. Ultimately you will need to go to this subdirectory:
C:\users\”Your Folder”\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup

6. Once at this folder right click your mouse and select “New”, the select “ShortCut”.

7. A window will pop up and ask “What item would you like to create a shortcut for?” Browne to your Netlogon.bat file and select it.

8. For the name of your shortcut type in Netlogon.cmd and select finished

9. Now right click on your new shortcut and select “Properties”

10. Under “Properties” select the Shortcut tab and where it says “Run” select “Minimized” from the dropdown menu

11. Select OK and close all the windows that are open

12. Reboot your system. Once Windows starts your batch file will run, but it will now run minimized in your task bar. It will take a little over 30 seconds to complete but when it does all of your drives should be correctly mapped and will do so everytime you reboot.

NOTES:

Make sure that you reset the folder options from Step 1.

You can change the “ping localhost” time if you want to try to make it quicker. On my faster systems I have it set to 10 and that seems to be working fine.

Hope this helps. Hope you have a SUPER Day!! God bless!!

Leave a Reply

Your email address will not be published. Required fields are marked *