After updating to Windows 10 version 2004, mapped network drives don’t reconnect after a restart. Here are some of the symptoms you may be experiencing:
- Mapped drives that link to your NAS (e.g., Synology, ReadyNAS, etc.) or Windows 2000/XP/2003 computers do not work after upgrading to Windows 10 v2004. Remapping the drive works only for the current session. Enabling the
SMB 1.0/CIFS File Sharing support
in Windows Features dialog also doesn’t help. - As soon as the computer restarts, a red X sign appears on the mapped drive, and the drive doesn’t reconnect. The following error appears when you attempt to access the mapped drive:
Restoring Network Connections
An error occurred while reconnecting z: to \\computername\share_name
Microsoft Windows Network: The local device name is already in use.
This connection has not been restored.
- The UNC paths to network shares work correctly, but only if you haven’t already mapped a drive letter to the share. If not, the following error occurs when you access the share using the UNC path: (e.g.,
\\computername\share_name
)\\computername\share_name is not accessible. You might not have permission to use this network resource. Contact the administrator of this server to find out if you have access permissions.
Multiple connections to a server or shared resource by the same user, using more than one user name, are not allowed. Disconnect all previous connections to the server or shared resource and try again. - When you try to connect to the network share using
\\servername\share_name
or\\IP_Address\share_name
using the correct domain\username and password, you may get the error code0x80070043 - The network name cannot be found
.
Many users have rolled-back Windows 10 to version 1903 or v 1909 due to the above issues.
Let’s see how to fix this issue without having to rollback Windows 10 to v1909 or v1903.
Fix: Mapped Network Drives Don’t work in Windows 10 v2004
There are several fixes or workarounds for this issue. On my systems, I had to remove the Windows credentials for the target computer using the Credential Manager. Then, I remapped the drives, typed in the username and password for the network share. That did the trick on my Windows 10 v2004 systems.
Reset the stored credentials using Credential Manager
Removing the stored username & password for the network share, and then remapping the network drive helps in some cases.
- Open Control Panel → User Accounts → Credential Manager
- Select Windows Credentials
- Under Windows Credentials, click the chevron next to the name of the network computer (or NAS) that hosts the share.
- Click Remove to delete the stored credentials of that particular computer or share.
- When the Delete Windows Credential dialog appears asking, “Are you sure you want to permanently delete this Windows credential?”, click Yes to continue
- Exit the Credential Manager window.
- Open This PC and disconnect the mapped drive.
- Restart Windows.
- Map the network drive again, with the Reconnect at sign-in option enabled.
- Restart Windows to check if the drive mapping works.
That should fix the problem. If not, follow the next procedure.
Add the “ProviderFlags” registry value
Adding the ProviderFlags
(DWORD 32-bit) registry value and set its data to 1
helps some users, especially if your mapped network drive points to an old SMBv1 share. Follow these steps:
- Right-click Start, click Run, type
regedit
, and then click OK. - Locate the following registry subkey:
HKEY_CURRENT_USER\Network\[drive letter]
Note: The
[drive letter]
placeholder represents the mapped drive. - Create a new DWORD (32-bit) value named
ProviderFlags
- Double-click
ProviderFlags
value. In the Value data box, type1
- Repeat the above procedure for each mapped network drive on the computer.
- Click OK, and exit Registry Editor.
- Restart Windows.
See if the mapped network drive persists across reboot.
Credits to user LeeB1430 for the above fix.
Remove the S4U-based Scheduled Task(s)
After updating to Windows 10 2004, many users have found that Windows forgets the stored credentials in various applications, including Outlook, Edge, Chrome, etc. The mapped network drive issue you’re facing could be caused by some problematic scheduled tasks.
I've been experiencing a really bad Windows 10 bug since the 2004 update. I got so annoyed I spent my weekend debugging it. A specific type of scheduled task can break CryptUnprotectData(). If you've seen apps losing state, eventid 8198, or NTE_BAD_KEY_STATE, could be this.
— Tavis Ormandy (@taviso) September 28, 2020
To fix this issue, check out the article Windows 10 forgets stored credentials or passwords for Outlook, Edge, Chrome, etc.
Map network drives using a batch file
If none of the above fixes help, then, as a workaround, you can map the network drive at every startup using a batch file.
- Copy the following lines and paste them in Notepad. Change the network or computer name, the share name, and the drive letter accordingly to match yours.
timeout /t 30 net use z: "\\networkname\sharedfolder" /persistent:no
The parameter
persistent:no
is equivalent to unchecking the Reconnect at sign-in option in the Map Network Drive dialog box. - Save the file as
mapdrive.bat
- Open the Startup folder of your user profile by typing
shell:startup
in the Run dialog.(To know more about theshell:
commands, check out this article.) - Place the batch file
mapdrive.bat
or its shortcut in the Startup folder.
That’s it. The drive mappings are created at every startup rather than making it persistent across reboots.
Important
The batch file method assumes that the username and password of the network drive are already stored under Windows Credentials. To store it, you may map the network drive interactively using the Map a Network Drive menu option, with the Reconnect at sign-in enabled. Then, disconnect the mapped network drive. That way, the username & password get stored in the Credentials Manager.
Alternatively, you can add the user name and password of the network share using the Add a Windows Credential option.
Note: A similar workaround using PowerShell is available in the Microsoft Knowledgebase article Mapped network drive may fail to reconnect in Windows 10.
Hope one of the fixes or workarounds helped you access your mapped network drives without any issues in Windows 10 2004.
One small request: If you liked this post, please share this?
One "tiny" share from you would seriously help a lot with the growth of this blog. Some great suggestions:- Pin it!
- Share it to your favorite blog + Facebook, Reddit
- Tweet it!
ProviderFlags in the registry was the fix for me. Thank you!
ProviderFlags worked. Thanks!
But a regedit should not be necessary.
And I also had to go through all the steps until ProviderFlags made things work for me also. So a large Thank You.
But why did we have to go through all this hassle?
And I also had to go through all the steps until ProviderFlags made things work for me also. So a large Thank You.
But why did we have to go through all this hassle?
… but after a further reboot, Windows again won’t connect to the NAS box.
I’ve tried so many different things now. Until I found this post and tried the ProviderFlags this works!
Big Thanks!
is there a way to add this to any mapped drive prior to user login? like a batch file or GPO?
Had the same problem with a new out of the box Lenovo Ideacenter 3 desktop running win 10 64 bit Ver: 19041
The Add the “ProviderFlags” registry value fixed the problem.
In the registry there was no providerflags value.
I had to add the line then change the (0) value to (1); rebooted computer and the nas drive connected to router via USB 3.0, was present and working.
Had the same problem with a new out of the box Lenovo Ideacenter 3 desktop running win 10 64 bit Ver: 19041
The Add the “ProviderFlags” registry value fixed the problem.
In the registry there was no providerflags value.
I had to add the line then change the (0) value to (1); rebooted computer and the nas drive connected to router via USB 3.0, was present and working.
date: 25Jan2021
ProviderFlags seems to have fixed this for me, the connection errors happening after ‘upgrading’ to Win10 2004.
on win10 20H2 and the regsitry edit Provider Flags breaks again after a reboot or shutdown. I created a simple batch file and added it to my startup folder in windows. I added user and pswd to credential manager manually or automatically if use Explorer and click computer then the Map Drive option and after it connects just disconnect it as stated above. Regardless now it works every time I restart my computer. Be nice when microsoft fixes the problem.
Hi David,
could you please describe exactly what you did? We have exact same problem and no solution.
you created batch file and ist still in use or now it works without batch file? whats in the batch file? the mapping or the adding of registry value?
you just connected the drive once and then manually disconnected it once? or disconnect it every time?
“now it works every time”: as questioned, batch still active? or after everything done you just connected it “normally” and it works now without any patching/batching/tweaking/…? 😉
big thanks in advance!!!!
Hey – old article, but had the issue on Windows 10 just now, and the ProviderFlags DWORD worked a dream. One user just stopped being able to UNC onto our resources for some reason. Couldn’t print and drive not connecting. After removing. Exported Network key from registry where a mapped drive was working, imported, added additional DWORD, reboot, now can connect to drives and printer.
Thank you!