How to Fix ‘The Local Device Name is Already in Use’ Error on Windows?

The error The Local Device Name is Already in Use is commonly encountered by those who frequently interact with networked systems and occurs during the network drive mapping process. The issue occurs when users attempt to access a network drive and are confronted with the following message:

An error occurred while reconnecting <drive letter> to <file path> Microsoft Windows Network: The local device name is already in use. This connection has not been restored.

Usually, this problem surfaces when users try to access files in a shared folder or map network drives within a domain. To resolve this error effectively, consider the following methods.

Pinpointing the exact cause can accelerate the troubleshooting process and help you find the most appropriate resolution. Possible reasons include:

  • Drive mapping errors: Sometimes, glitches in network drive mapping result in issues such as duplicate drive letters.
  • Unassigned drive letters: Errors may occur when drive letters are not correctly designated or are missing.
  • Disabled File and Printer Sharing: When File and Printer Sharing is deactivated in your firewall settings, network-related errors, including this one, can occur.
  • Insufficient server space: Increasing the space on the network server’s root drive is known to resolve this error.

1. Delete a Registry Key

Over time, the registry can accumulate entries that are no longer in use or that conflict with current settings. Deleting the specific registry key associated with drive mounting effectively cleans out these digital cobwebs, allowing your system to refresh its network drive connections without stumbling over past configurations that are now outdated or problematic.

Before proceeding, it’s important to back up your registry. Refer to our guide on how to back up the registry for careful instructions.

  1. Open the Registry Editor by typing regedit into the search bar.
    Accessing the Registry Editor
  2. Navigate to the following path using the Registry Editor’s left pane:
    HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer
  3. Right-click the MountPoints2 key within the Explorer key, select Delete from the context menu, and confirm any following prompts.
  4. Restart your computer and check if the error message still appears.

2. Remap the Drive Using Command Prompt

This process involves using much-recognized commands to first sever any existing ties to network drives and then establish a new, fresh connection. It’s similar to rebooting a problematic device; through remapping, the network paths are reset, potentially clearing the error and allowing for smooth access to the designated network resources.

This process renews the connection to the network resource, allowing the system to establish a new mapping without the conflict associated with duplicate drive names or outdated connections.

  1. Search for Command Prompt, right-click the top result, and select Run as administrator.
  2. Type the following command in the Command Prompt window and press Enter:
    net use * /delete

  3. After successfully executing the command, run the next command:
    net use Z: \\server\share /user:username password

    Make sure to replace username and password with your actual network credentials, and then check if the issue persists.

3. Correctly Assign Drive Letters

When a network drive is mapped, it uses a specific letter as an identifier. If this letter isn’t available or is accidentally assigned to another device, it leads to a conflict, prompting the error. By accessing Disk Management and assigning a unique, unused drive letter to the network drive, you effectively eliminate any overlap or confusion, thereby resolving the issue and restoring access to the networked resource.

  1. Make sure no files on the storage devices you plan to modify are in use. Avoid copying or transferring files to or from the disk before making changes.
  2. Press Windows Key + X and select Disk Management from the menu.
    Opening Disk Management
  3. In Disk Management, right-click the volume that requires a new drive letter and choose Change Drive Letter and Paths. Then, select a new letter from the list.
    Modifying Drive Letter and Paths
  4. Avoid selecting the letters A or B, as they were traditionally reserved for floppy drives and could lead to issues with older software. Click Apply to confirm, accept any prompts, and then close the utility. Check if the error has been resolved.

4. Enable File and Printer Sharing in Your Firewall

When File and Printer Sharing is disabled, your computer’s firewall may block network discovery and file sharing services, which are essential for accessing drives on a network. By enabling this feature, you allow your system to communicate with other devices on the network, facilitating the successful mapping of network drives and, in turn, potentially resolving the error.

  1. Open the Control Panel using the Windows search functionality.
  2. Change the Control Panel view to Large or Small icons and locate Windows Defender Firewall.
    Accessing Windows Defender Firewall
  3. Select it and click on the Allow an app or feature through Windows Firewall link in the sidebar. Click the Change settings button, providing admin permissions if prompted.
  4. Find and tick the box for File and Printer Sharing, press OK to save changes, and reboot your device.
    Enabling File and Printer Sharing
  5. After restarting, try accessing the network again to see if the error has been corrected.

5. Change the ProtectionMode Value in the Registry

This particular setting influences how the operating system manages permissions and access to network drives. When changed, it adjusts the way network resources are allocated, potentially resolving conflicts that might cause the error, especially when users without administrator privileges are engaging with network drives.

This minor yet powerful adjustment basically instructs your system to relax certain security parameters, thereby facilitating smoother network connections and drive mappings.

  1. Press Windows Key + R, type regedit into the run dialog, and hit Enter.
  2. Navigate to the following registry path:
    HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\SessionManager\
  3. Locate the ProtectionMode key.
  4. Change the key value from 0 to 1, save your changes, and restart your computer to check if the issue is resolved.

If the problem remains, try manually removing the mappings with this command in an elevated Command Prompt:

net use * /del /y

Note: If needed, replace the asterisk (*) with the particular drive letter.

The error may also come from inadequate space on the server’s root drive. Should you have access to the server, free up necessary space by deleting non-essential files.

Whilst there is no definitive minimum for free space, it’s a good practice to clear a few gigabytes. After making space, reassess to determine if the error persists.

ABOUT THE AUTHOR

Kevin Arrows


Kevin Arrows is a highly experienced and knowledgeable technology specialist with over a decade of industry experience. He holds a Microsoft Certified Technology Specialist (MCTS) certification and has a deep passion for staying up-to-date on the latest tech developments. Kevin has written extensively on a wide range of tech-related topics, showcasing his expertise and knowledge in areas such as software development, cybersecurity, and cloud computing. His contributions to the tech field have been widely recognized and respected by his peers, and he is highly regarded for his ability to explain complex technical concepts in a clear and concise manner.

Comments

24
    ПГ
    Пламен Грибачев Sep 16, 2020

    Hi Kevin,
    In our company we have a constant problem with the loss of mapped devices to the file server. In our case, the drive mapping is done by a group policy vbs logon script through the AD domain. Periodically, the connection to the file server is lost and when we try to access the file resources, it returns the error specified in your post. This problem occurred on all computers with Windows 10, which were updated to version 2004. We noticed that after restarting the workstation service the problem is fixed.
    Please help us to resolve this problem, which happens to a large number of computers in our company!Best Regards,
    Plamen Gribachev

      KA
      K. Arrows Author Oct 16, 2020

      Can you try the following suggestion please:Change HKEY_LOCAL_MACHINESystemCurrentControlSetControlSessionManagerProtectionMode from 1 to 0.

        MD
        Michael P Duncan Mar 18, 2021

        This did not fix anything for me, I can remap the drives and after a random time later it is back

      GE
      Gezim Mar 15, 2021

      Hi Plamen,

      i have the same issue. Did you found any solution!

      Best regards,
      Gezim

    ПГ
    Пламен Грибачев Sep 16, 2020

    Hi Kevin
    I forgot to mention that we tried to disconnect all the mapped devices and connect them again, but the problem remains and recurs periodically. firewall is off on default in out domain.

      EG
      Eggy Nov 20, 2020

      Hi Plamen, have you found the solution? I’m having the same problem as you

        ПГ
        Пламен Грибачев Nov 23, 2020

        We have updated firmware for our NAS Lenovo and after that the problem was
        resolved!

    ME
    MergatroidMania Oct 9, 2020

    I am having the same problem on a NAS. The NAS is only about 6 years old, it’s a Lenovo NAS. We have to enable SMB to get this NAS to work. Since I have put Windows 10 on my computer (a clean install) this drive has intermittently failed to connect. Sometimes I can work on it for an hour before it will suddenly start working, while the Windows 7 PCs have no problems with it. I changed the share path to use the IP address instead of the network name last time this happened, and it seemed to fix the problem. Today, I am getting the “device name already in use error, which I have never seen on our systems before. This is not a server share, it’s a NAS and still has plenty of space on it. It was set up without credentials so everyone can use it from all the PCs in our shop.
    I thought your idea about SMB in the firewall might work, but it’s already turned on. However, I also tried to turn on File and Printer Sharing over SMBDirect, but it won’t let me. When I click in the check boxes nothing happens.

      KA
      K. Arrows Author Oct 16, 2020

      Are you able to ping the NAS from 10 machine when the error “device name already in use” shows up?Also, can you issue the net use command from command prompt on one of the machines in question and post a screenshot or text output here?And change the entry for HKEY_LOCAL_MACHINESystemCurrentControlSetControlSessionManagerProtectionMode from 1 to 0.Reboot the PC and Test. If its still not resolved then issue the net use command again and delete the mappings using the following command
      net use * /del /y (or sub the * for an actual drive letter.)Remap the drives, reboot and test.

      Reply
        ME
        MergatroidMania Feb 19, 2021

        Hi
        I have been very busy so I have not had a chance to waste more time on this, but we have upgraded a few more computers to Windows 10 and on every one of them, the network mapped drive for our NAS is doing this same thing.

        If I delete the mapped drive and remap it, it works. But if I reboot the PCs, the drive fails again. I have tried using both the network name and the ip address. I have changed the value of the PorotectionMode bit from 1 to 0, and it did remove the red X from the drive after rebooting, and it seems as though it was going to work as it actually opened a window, but then “Specified network name is no longer available” error and it will not work again.

        We had used this NAS for years in Windows 7 with no problems. We can access the NAS using a web browser and we can ping it from the command prompt, but the mapped network drive will always produce one of the two errors unless I delete it and remap it, which only lasts until the next boot.

        The NAS is a Lenovo iX2. I have had to install SMB 1.0 just to get the NAS to work, otherwise we couldn’t access it at all. I had to do the same thing with my older ReadyNAS Duo at home, but I am not having any issues with it in Windows 10. I also have mapped drive set up to another computer in our shop that is full of service manuals, and it does not do this, only the mapped drive for the Lenovo NAS does it.

    CT
    Craig Thom Oct 29, 2020

    Thank You!

    LO
    Loodis Dec 19, 2020

    Thanks! Worked!!

    BH
    Bret Hess Feb 17, 2021

    Thanks!

    ME
    MergatroidMania Mar 30, 2021

    Yes, I can ping when the “device name is already in use” error comes up (which is what’s happening right now).

    Which Net Use command are you referring to? I tried stopping and starting the computer browser, and there were no problems doing that but it did not correct the problem. The only other net use commands I see here are for deleting and remapping the drive.

    Which one would you like me to test?

    Thanks for your assistance on this by the way. It’s very frustrating.

      MZ
      Muhammad Zubyan Author Mar 30, 2021

      Yes, delete the drives and remap them again. Use the command provided above and let me know how it goes.

        ME
        MergatroidMania Apr 21, 2021

        Hi again.

        I just wanted to thank you for all you efforts attempting to help us on this.

        My boss’s solution was to replace the NAS. That seemed to have worked so far. Well, at least until the next time.

        Thanks again for your help.

        MA
        Matt Oct 21, 2021

        Hello, came across this and I’ve been doing this for workers in our office who use Windows 10 VPN at home. This fixes the problem, but then they come into the office and then go back home and they get the same message again. Sometimes they just come into the office and get the error. Almost always “this drive is already connected”Is there a permanent fix? I’ve tried mapping the drives using names and IP addresses but that doesn’t seem to help.it’s only affecting people who go between office and home. Machines that stay in the office are always fine.

    PJ
    pjcamp Apr 23, 2021

    net stop “Computer Browser”

    The service name is invalid.

      MZ
      Muhammad Zubyan Author Apr 23, 2021

      It means that the service isn’t installed in your computer, have you tried other methods?

      SS
      Shao Skywalker Jun 2, 2021

      Not sure which version, but in newer versions of Windows 10, you should try restarting the Workstation service.

      Reply
      PP
      Peter P Mar 17, 2022

      This depends on your Windows language settings. It will not be named “Computer Browser” unless you’re using an English Windows.

    PJ
    pjcamp Apr 23, 2021

    net use z: \BohrDataMusic /user:xxxxx xxxxx

    Multiple connections to a server or shared resource by the same user using more than one user name are not allowed.

    WR
    wrnorwood May 19, 2021

    Found my own workaround. not sure if it will work for everyone. Instead of mapping the network drive, add it as a network location. Worked for me and haven’t had a problem connecting since.

    Reply
    BP
    Bryan Pauquette Oct 21, 2022

    Fire Microsoft QA. Hire new QA. Seems in order.