Windows 10 Does Not Reconnect Mapped Network Drives [Fix]

If you have a home or work network set up for your Windows PC, you may also be mapping network shares to drive letters. Mapped drives are very convenient as they allow accessing network files and folders just like a regular local drive. Sometimes in Windows 10, mapped drives do not always automatically and reliably reconnect at logon. Let us see how to fix this issue.

If a mapped network drive wasn't reconnected, any program that tries to access resources on the mapped network drive fails.

When you create a mapped network drive, there is an option 'Reconnect at logon' which you can check so that every time Windows logs on, they are automatically mounted using the current user's logon credentials.

Map Network Drive Wizard Windows 10

If you check 'Connect using different credentials', then you can specify a different user name and password.

The problem: When Windows 10 logs on, there is a timing issue which causes it to attempt to map the network drives before the network is available. This results in them being unavailable sometimes. If you press Refresh in Windows Explorer or double click the drive, they instantly become available.

To fix the issue Windows 10 Does Not Reconnect Mapped Network Drives, you need to do the following.

  1. Paste the following text inside Notepad and save as a *.cmd file.
    @echo off
    
    :Start
    timeout /t 5 /nobreak >NUL
    if exist X:\NUL goto End
    net use X: \\server\share /USER:domainname\username /PERSISTENT:YES
    if ERRORLEVEL 1 goto Start
    :End
    
    

    Replace the domainname\username portion with the appropriate values.
    Windows 10 Reconnect Mapped Drives

  2. In Notepad, press Ctrl + S or execute the File - Save item from the File menu. This will open the Save dialog. There, type or copy-paste the name "reconnect.cmd" including quotes. Double quotes are important to ensure that the file will get the "*.cmd" extension and not *.cmd.txt. You can save the file to any desired location.Windows 10 Save Batch File
  3. Move the *.cmd file you created to the Startup folder. Refer to the following article: How to add or remove startup apps in Windows 10. In short, press Win + R shortcut keys together and type the following into the Run box:
    shell:Startup

    This will open your Startup folder in File Explorer.Windows 10 Startup Folder

  4. Move the reconnect.cmd file there and you are done.

That's it. Many thanks to our reader "Jezze" for sharing this tip.

19 thoughts on “Windows 10 Does Not Reconnect Mapped Network Drives [Fix]

  1. JonP

    If you check reconnect at sign in, there’s a noticeable log in loading time even in high end machines. What I do is create a task schedule to map the network drive 1 minute time after log in.

    Reply
    1. Allan

      Would you care to share instructions on how to accomplish what you have done with the task scheduler? I tried looking into it and cannot figure it out. Thank you in advance.

      Reply
  2. Toshik

    Is there a registry settings to increase stock timeout for Mapping Network Drives?

    Reply
  3. Andreas

    I’ve created a similar solution just check it out, it still needs a bit of work but can be configured and works great for me ;) https://github.com/thexmanxyz/network-share-reconnecter/

    Reply
  4. Bent Dueholm

    Hi Sergey
    I am new to this.
    I have two network drives that will not reconnect. Your cmd works like a charm. Thanks.
    But I am only able to reconnect one of the drives. How will the cmd file look if i want to reconnect both a X: drive as well as a Z: drive?
    Regards

    Reply
    1. Sergey Tkachenko Post author

      Something like this
      @echo off

      :Start
      timeout /t 5 /nobreak >NUL
      if exist X:\NUL goto End
      net use X: \\server\share /USER:domainname\username /PERSISTENT:YES
      if ERRORLEVEL 1 goto Start
      :End
      :Start2
      timeout /t 5 /nobreak >NUL
      if exist Z:\NUL goto End2
      net use Z: \\server\share2 /USER:domainname\username /PERSISTENT:YES
      if ERRORLEVEL 1 goto Start2
      :End2

      Reply
      1. Bent Dueholm

        Thanks a lot.

        Reply
        1. Sergey Tkachenko Post author

          You’re most welcome!

          Reply
  5. DJ

    Thank you. This solved the problem I was having with a scheduled batch file not finding the mapped drive it needed. Worked like a charm.

    Reply
  6. chris

    Hi,

    Do I need to tweak this at all to include mapped drive passwords? Or does this script call on the credentials stored locally?

    Reply
    1. Sergey Tkachenko Post author

      It uses the stored credentials.

      Reply
      1. chris

        I have copied the script and amended the server (naswhite) and username (paul). However when I log in to windows, a command prompt is waiting for me saying:

        The password or user name is invalid for \\naswhite\public.

        Enter the password for ‘Paul’ to connect to ‘naswhite’:

        I have double checked with windows credentials that the username is correct, even down to the case sensitivity. Do you have any idea why this is happening?

        Regards,
        Chris

        Reply
        1. chris

          If it uses the password from the stored credentials, then that suggests to me that the username in the script doesn’t match the one stored locally. But I’ve checked, three, four times and they are the same. I have no idea what I’ve done wrong

          Reply
          1. Kim

            I have exactly the same issue, the credentials are correct, and yet it still prompt the first time

  7. Rico

    Thank you much Sergey. I had to connect multiple drives and I just replicated the commands following the format..:Start2,3,4 etc. I also found that for drives on the domain that are public I did not need the../USER:domainname\username..line. I hope this helps others.

    Reply
  8. C SIU

    I prepared a batch file with Net Use commands to make sure the drives are remapped. Appears to work for me.

    Reply
  9. Steve

    I read your article with interest. My problem is different: I have a windows 10 pc and a symbology nas on a gigabit Ethernet. There are several shares attached as mapped drives with reconnect at logon ticked.

    If the nas boots up after the pc, programs cannot access the network drives until I use windows explorer to open the drives.

    Do you know of a way to have the pc automatically access the drives when the nas is booted after the pc?

    Reply
  10. John

    Hi Sergey
    I have a Western Digital “MyCloud” external hard drive networked with my Acer laptop. I use the WD to run scheduled backups of specific Acer data files during the nighttime hours. I have six (6) such scheduled backups and, accordingly, six (6) mapped networked drives on the WD external hard drive.

    Until one of the recent updates to Windows 10 these mapped network drives reconnected at startup…now they refuse to do so and I have to reconnect them manually. As a result, I’m looking at your solution. I’m currently on Windows 10 Pro, Version1809, Build 17763.503.

    Far as I can tell I’m NOT connected to nor affiliated to a “Domain” so I’m wondering how to modify your Code to accommodate the lack of a “Domain”…

    Your Code…
    if exist Z:\NUL goto End
    net use Z: \\server\share /USER:domainname\username /PERSISTENT:YES
    if ERRORLEVEL 1 goto Start

    My Code????????????….how to modify??????????
    if exist Z:\NUL goto End
    net use Z: \\server\share\MYUSERNAME /PERSISTENT:YES
    if ERRORLEVEL 1 goto Start

    I appreciate your input…John

    Reply
    1. John

      This worked for me…
      @echo off
      :Start
      timeout /t 5 /nobreak >NUL
      if exist Z:\NUL goto End
      net use Z: \\WDMYCLOUD\Sytem_Image /PERSISTENT:YES
      if ERRORLEVEL 1 goto Start
      :End
      :Start2
      timeout /t 5 /nobreak >NUL
      if exist Y:\NUL goto End2
      net use Y: \\WDMYCLOUD\Outlook /PERSISTENT:YES
      if ERRORLEVEL 1 goto Start2
      :End2
      :Start3
      timeout /t 5 /nobreak >NUL
      if exist X:\NUL goto End3
      net use X: \\WDMYCLOUD\Acer_New /PERSISTENT:YES
      if ERRORLEVEL 1 goto Start3
      :End3
      :Start4
      timeout /t 5 /nobreak >NUL
      if exist T:\NUL goto End4
      net use T: \\WDMYCLOUD\Predator /PERSISTENT:YES
      if ERRORLEVEL 1 goto Start4
      :End4
      :Start5
      timeout /t 5 /nobreak >NUL
      if exist N:\NUL goto End5
      net use N: \\WDMYCLOUD\FileHistory /PERSISTENT:YES
      if ERRORLEVEL 1 goto Start5
      :End5
      :Start6
      timeout /t 5 /nobreak >NUL
      if exist M:\NUL goto End6
      net use M: \\WDMYCLOUD\Quicken /PERSISTENT:YES
      if ERRORLEVEL 1 goto Start6
      :End6

      Reply

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.