Network drive keeps disconnecting in Windows 10 / 11 Fix

Network drive works as an additional storage device that is not physically a part of your system but works as an additional HDD that you can access from any computer on your network. While a well-mapped network drive can make your life easy, the misconfigured one can worsen the life. ‘The network drive keeps disconnecting’ issue will come along with the misconfigured drive. Follow these easy solutions on your computer to solve the problem.


ADVERTISEMENT

Note: Some users have reported that MalwareBytes also seem to be the cause of this error. You can disable MalwareBytes temporarily and see if it works or not.

 

Fix 1 – Modify the Registry

You can alter the registry to fix this repetitive issue. This way we will uplift the default time-out period for the connection.

Step 1 

1. Press the Windows key+R keys together.

2. When the Run window appears, type “regedit” and click on “OK“.

 

Regedit In Run

 

Warning

After the Registry Editor prevails, just click on “File” and click on “Export” to create a new backup on your computer.

 

Export Registry

 

If anything out of the ordinary occurs while altering the registry, you can easily retrieve the registry back to normal.

3. Once the Registry Editor opens up, proceed to this location on the Registry Editor screen –

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lanmanserver\parameters

 

4. On the right-hand side, check out the “autodisconnect” key.

5. Double click on it.

 

Auto Disconnect Dc Min

 

6. Choose the “Hexadecimal” base.

7. In the ‘Value data:’ box, set the value as “ffffffff“.

8. Click on “OK“.

 

Fff Ok

 

[

*NOTE

If you can’t find the ‘autodisconnect‘ key, follow these steps-

a. Right-click on the empty space, click on “New>” and click on  “DWORD (32-bit) Value“.

b. Set the name as the “autodisconnect“.

 

New Dword Min

6. Now, set the “Hexadecimal”  Value data as “ffffffff”.

]

 

Fix 2 – Modify the Group Policy

1. Open Group policy editor

2. Now, Go to User Configuration > Preferences > Windows Settings > Drive Maps

3. Change it to Update as shown below.

 

Drive Map Update Min

Fix 3 – Enable DNS Cache

You have to enable the DNS cache from the registry.

1. In the Registry Editor window, go to this location –

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Dnscache

2. Then, double click on “Start“.

 

Start Dnscache Min

 

3. Set the ‘Value Data:’ to “2” and click on “OK“.

 

2 Ok Min

 

Go to the next step –

STEP 2 – Add the EnableLinked Connections

1. On the Registry Editor screen, go to this location  –

Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System

 

2. Then, right-click on the empty space, click on “New>” and click on  “DWORD (32-bit) Value“.

3. Set the name as the “EnableLinkedConnctions “.

 

New Dword Min

 

4. Next, double click on the key to modify it.

 

Enabledlink Con Min

 

5. Set the value to “1“.

6. Click3n “OK“.

 

1 Ok Min

 

 

STEP 3 – Allow Insecure Login

Sometimes allowing the insecure log-in to the network computer may help.

1. Next, go to this location of the Registry Editor screen –

Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters

 

2. Then, on the right-hand side, double click on the “AllowInsecureGuestAuth” key.

 

Allow Insecure Guest Dc Min

 

3. Set this value to “1“.

4. Click on “OK“.

 

1 Ok Min

 

[

*NOTE

If you can’t find the ‘AllowInsecureGuestAuth ‘ key, follow these steps-

a. Right-click on the empty space, click on “New>” and click on  “DWORD (32-bit) Value“.

b. Set the name as the “AllowInsecureGuestAuth “.

 

New Dword Min

 

]

 

Step 4 – Delete and recreate the mapped drive

This is the final step of this fix.

1. In the Registry Editor screen, go to this directory


ADVERTISEMENT

Computer\HKEY_CURRENT_USER\Network

 

2. On the left-handed side, you will notice the network (it is the drive letter of your network drive.)

For us, it is denoted by “X“.

3. Right-click on the particular key and click on “Delete“.

 

Delete Network Id Min

 

4. After that, go to this section –

Computer\HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Map Network Drive MRU

 

5. Here you will notice an entry of an alphabet (like – a, b, etc.) on the right-hand side.

6. Right-click on it and click on “Delete“.

 

Delete A Letter Min

 

Close the Registry Editor. Restart the machine once and after restarting your computer, connect the network drive.

7. Then open up the Registry Editor again on your computer.

8.In the Registry Editor screen, go to this directory

Computer\HKEY_CURRENT_USER\Network

 

9. On the right-hand side, right-click on the “New>” and click on “DWORD (32-bit) Value“.

10. You have to name this new value “ProviderFlags“.

 

New Dword Min

 

11. After that, double click on this key.

 

Provider Flags Dc Min

 

12. Set the value to “1” and click on “OK“.

 

1 Ok Provider Flages Min

 

Check if this helps you to resolve the problem on your computer.

If this thing fails, follow these instructions.

1.  At first, type “cmd” in the search box.

2. After that, right-click on the “Command Prompt” and click on “Run as administrators“.

 

Cmd Search New Min

 

3. Once the Command Prompt opens up, execute this set of codes. Copy-paste this command and hit Enter.

net use Z /delete
net use /p:yes
net use *: \\servernameorIP\sharename

 

Net Use Z

 

NOTE

Z in the first command denotes the drive letter of the network drive. You can alter it according to the drive letter

Once you have executed these commands, check if you are still experiencing the same issue or not.

 

Fix 4 – Run CMD command

If the registry fix didn’t work out, run this from the command line.

1. Press the Windows key+S keys together.

2. Then, type “cmd” and right-click on the “Command Prompt” and click on “Run as administrator“.

 

Cmd Search New Min

 

3. To disable the auto-disconnect feature on your computer, type this command and hit Enter.

net config server /autodisconnect:-1

 

Net Config Server Discnt Cmd Min

 

This will stop your machine from automatically disconnecting from the network drive.

Check if this solves your problem.

 

Fix 5 – Disable offline files

Sometimes bugs in the offline files containing the data of the network may be causing this.

1. Right-click on the Windows icon on the taskbar and click on “Run“.

2. Then, type “mobsync” and click on “OK“.

 

Mobsync Sync Center Run Command Min

 

3. Once the Sync Center opens up, on the left-hand side, click on “Manage offline files“.

 

Manage Offline Files Min

 

4. In the Offline Files window, go to the “General” tab.

5. After that, click on “Disable offline files“.

 

Disable Offline Files Min

 

6. Finally, click on “Apply” and “OK“.

 

Apply Ok Min Min

 

Once you have disabled the offline files, close all the opened windows. Reboot your machine.

7. After that, test out the network drives connected to your system.

8. If you still can’t locate the drive, open the File Explorer window and open a mapped drive.

9. Then, right-click on the drive and click on “Always available offline“.

Patiently wait for the process to be complete.

10. Next, right-click on the network share and untick “Always available offline“.

Restart your computer.

This should have fixed your issue.

 

Fix 6 – Use the Group Policy Editor

You need to alter the Group Policy settings on your computer.

1. To access the Run window, press Windows key+R.

2. After that, type “gpedit.msc“. Click on “OK“.

 

blank

 

3. When the list of policies arrive on your screen, navigate to this particular policy location-

Computer Configuration -> Administrative Templates -> System -> Logon

 

4. After that, double click on the ” Always Wait for the network at computer startup and logon“.

 

Always Dc Min

 

5. Then, click on “Enabled” to set the policy settings.

6. Click on “Apply” and “OK“.

 

Enabled Min

 

Once you have modified the policy settings, close the Local Group Policy Editor window.

This will set your computer to start up the network drives at the time of booting. This should fix your problem.

NOTE1

This solution may solve your problem, but in the process, you will experience a lengthier boot time (as your system tries to startup the network drive). To stop this issue, follow these steps –

1. Press the Windows key+R keys together.

2. When the Run window appears, type “regedit” and click on “OK“.

 

Regedit In Run

 

3. Here, the Registry Editor opens up, proceed to this location on the Registry Editor screen –

Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon

 

4.Now you have to right-click on the space, click on “New>” and click on  “DWORD (32-bit) Value“.

5. Set the name as the “GpNetworkStartTimeoutPolicyValue “.

 

New Dword Min

 

6. Then, double click on the key to modify it.

 

Gpnetwork

 

7. Then, choose the base “Hexadecimal“.

8. After that, set the value to “0x3C“. This will allow your computer to wait for 60 seconds to establish a connection to the network drive.

If your computer takes another amount of time in seconds, feel free to alter the value to that seconds.

9. Click on “OK“.

 

3c Ok

 

Once you have done that, restart your machine. Check the status of the problem.

NOTE – 2 

If you are trying to access a remote network from Synology, you may need to toggle additional settings also.

1. Go this way –

Control Panel -> File Services -> Advanced

2. Then, toggle the “Enable Windows Network Discovery” settings to “ON“.

3. Similarly, set the “WS Discovery” to “ON“.

4. Don’t forget to set the ‘Min SMB’ to “SMB1” and then set the ‘Max SMB2’ to “SMB2“.

This should fix the issue with the network driver.

 

Fix 7 – Alter group policy (corporate network only)

If you are facing this issue with a corporate network, there may be some issues with the group policies.

Workarounds

a. You can try replacing, recreating, or updating the mapping in the drive helps. Don’t forget to check the opinion “Stop processing once applied” setting.

b. Check if there are any hidden devices is using the drive letters.

1. You have to access the Local Group Policy settings. Press the Windows key with the ‘R‘ key together.

2. Then, type “gpedit.msc” and hit Enter.

 

blank

 

3. At the next step, go here-

Computer Configuration/Administrative Templates/System/Group Policy/

 

4. After that, double-click on this “Allow processing across a slow network connection” from the right-hand side.

5. Set it to “Enabled“.

6. To save the settings, click on “Apply” and “OK“.

 

Enabled Universal

 

Similarly, configure these settings like this –

Configure Drive Maps preference extension policy processing: Enabled

Allow processing across a slow network connection: Enabled

Process even if the Group Policy objects have not changed: Disabled

Background priority: Idle

 

Close the Group Policy Editor settings on your computer and check if this solves your network drive issue.


Fix 8 – Modify the network adapter

The network adapter you are using may be disconnecting the drive from your machine.

1.  First of all, right-click on the Windows icon.

2. Then, click on the “Device Manager” to access it.

 

Win + X Device Manager

 

3. In the Device Manager, expand the “Network adapters“.

4. After that, right-click on the network card you are using and click on “Properties“.

 

Ethernet Props Min

 

4. Go to the “Power Management” tab.

5. Untick the box beside “Allow the computer to turn off this device to save power“.

6. Don’t forget to click on “OK” to save the change.

 

Allow Comptuer To Save Power Universal

 

Close the Device Manager window. Reconnect with your network drive again.

If the network drive is still disconnecting, follow these steps –

1.  At first, type “cmd” in the search box.

2. After that, right-click on the “Command Prompt” and click on “Run as administrators“.

 

Cmd Search New Min

 

3. You can disable the auto-disconnect feature on your computer. Copy-paste this command, and hit Enter.

net config server /autodisconnect:-1

 

Net Config Server Discnt Cmd Min

 

Close the Command Prompt screen. Restart the computer and reconnect to the network drive.

Check again.

If the network issue is still there, follow these steps –

1. Open the Device Manager.

2. Once it opens up, right-click on the network adapter and click on “Properties“.

 

Ethernet Props Min

 

3. Go to the “Advanced” tab.

4. Then, click on “Wait for Link” from the list of ‘Property:’.

5. Set the ‘Value:’ as “On“.

 

Wait For Link Ok Min

 

6. Finally, click on “Apply” and “OK” to save this change.

 

Apply Ok Min Min

 

This will save the changes. Reboot your computer and check again.

If the network drive is still disconnecting from your system, follow these steps –

1. At first, you need to press Windows key+R keys together.

2. After that, type “ncpa.cpl“. Click on “OK“.

 

Run Command Ncpa.cpl Enter

 

3. After the Network Connections screen appears, right-click on the network connection.

4. After that, you need to click on “Properties“.

 

Ethernet Props New Ncpa Min

 

5. Then, click on “Configure“.

 

Configure Min

 

6. In the Properties window, click on the “Advanced” tab.

7. Then, scroll down to the “Speed & Duplex” option. Then, set the value to the speed that is equal to your network speed.

(Example – If your network speed is 1.0 Gbps, then select “1.0 Gbps Full Duplex” from the list.)

8. Don’t forget to click on “OK“.

 

Speed And Duplex 1.0 Gbps Min

 

Close the Control Panel window and restart your computer.

You won’t experience the issue again.

 

Fix 9 – Turn off fast startup

If the computer is set to start up very fast, the network may disconnect frequently.

1. At first, you need to press Windows key+R keys together to launch the Run window.

2. Now, copy-paste this command and then hit Enter to execute it.

powercfg.cpl

 

Poweroptions Run

 

Power Options window will be opened.

3. Then, click on the “Choose what power buttons do” option.

 

Choose What The Power Buttons Do Min

 

4. You need to click on “Change settings that are currently unavailable“.

 

Change Settings

 

5. Next, under ‘Shutdown settings‘, clear the box beside the option “Turn on fast startup (recommended)“.

6. Then, click on “Save changes“.

 

Turn On Fast Startup

 

Once you have switched off the fast startup, restart your computer.

Then, connect to the remote computer and check it out again.

 

Fix 10 – Reset your network credentials

You can reset your network credentials from your machine to solve the problem on your computer.

STEP 1 – Remove older credentials

1. Open the File Explorer from your computer. Click on “This PC“.

2. After that, go to your network drive location. Right-click on the drive and click on “Disconnect” to unlink it.

3. At first, click on the search box and type “Credential Manager“.

4. Then, click on “Credential Manager” in the search result.

 

Credential Manager Serach New Min

 

5. After that, click on the “Windows Credentials“.

6. You will see a list of credentials here. Look for the credential your network is using.

7. Click on the particular network credential to access it. Then, click on “Remove” to remove the credential from your system.

 

Windows Credential Remove Min

 

Once you have removed the credentials from your computer, restart your machine.

 

STEP 2 – Add new credentials

After restarting the machine you have to add new credentials of the network to map it again.

1. Type “Credential Manager” in the search box.

2. After that, click on “Credential Manager” in the search result.

 

Credential Manager Serach New Min

 

3. After that, click on the “Windows Credentials“.

4. Then, click on “Add a Windows credential“.

 


ADVERTISEMENT


Add A Credential

 

5. Now, enter the network credentials in particular sections (like – network address, User name, and password)*.


ADVERTISEMENT

6. Then, click on “OK” to finish mapping up the drive.

 

Interent Ip Ok Min

 

7. Don’t forget to check the box beside the “Reconnect at Sign-in” option.

8. Use a different drive letter of the remapped drive and complete the process.

Restart your computer. After restarting your computer, your machine will be connected to the drive.

[

*NOTE

We recommend you use the IP of the host. Then, add that particular IP in the Hosts file on your computer. Don’t know how to do it? Read this guide on how to edit hosts file.

]

 

Fix 11 – Run scripts

There are two scripts you can run to fix this problem.

STEP 1 – Create the scripts

At first, you have to create two new scripts. Follow these steps.

Building the CMD script

1. At first, you need to type “Notepad” in the search box.

2. After that, right-click on the “Notepad” and then click on “Run as administrator“.

 

Notepad

 

3. When a blank Notepad window comes up, copy-paste this code there.

PowerShell -Command "Set-ExecutionPolicy -Scope CurrentUser Unrestricted" >> "%TEMP%\StartupLog.txt" 2>&1 
PowerShell -File "%SystemDrive%\Scripts\MapDrives.ps1" >> "%TEMP%\StartupLog.txt" 2>&1

 

4. Then, click on the “File” on the menu-bar and click on “Save as“.

 

File Save Sa Min

 

5. After that, you have to choose a location to save the file (preferably, on your desktop).

6. In Save as Type option, Just choose All files.

7. After that, name the file as “MapDrives.cmd“.

8. Finally, click on “Save“.

 

Map Drives Cmd Min

 

Once you have saved the file, go for the next step.

 

Designing the PowerShell script

Now it is time to create the PowerShell script on your computer.

1. At first, open a Notepad window.

2. After that, paste this code into the blank window.

$i=3
while($True){
$error.clear()
$MappedDrives = Get-SmbMapping |where -property Status -Value Unavailable -EQ | select LocalPath,RemotePath
foreach( $MappedDrive in $MappedDrives)
{
try {
New-SmbMapping -LocalPath $MappedDrive.LocalPath -RemotePath $MappedDrive.RemotePath -Persistent $True
} catch {
Write-Host "There was an error mapping $MappedDrive.RemotePath to $MappedDrive.LocalPath"
}
}
$i = $i - 1
if($error.Count -eq 0 -Or $i -eq 0) {break}

 Start-Sleep -Seconds 30  }

3. Again, click on the “File” on the menu-bar and click on “Save As” to save the file.

 

File Save Sa Min

 

4. Choose a location to save the powershell script (generally, on your desktop).

6. After that, in Save as Type option, select the All files.

7. After that, name the file as “MapDrives.ps1“.

8. Finally, click on “Save“.

 

Map Drives Ps1 Min

 

Once you have built the PowerShell script, go to the next step.

 

STEP 2 – PLACE THE SCRIPTS

Now, you have to save the scripts in particular places so that they can be triggered at the time of bootup.

1. Press the Windows key along with the E key.

2. Once the File Explorer opens up, click on “View“.

3. Then click on “Options“.

 

View And Options Min

 

4. In the Folder Options window, go to the “View” tab.

5. Henceforth, check the option “Show hidden files, folders, and drives“.

 

Showhiddenfiles

 

6. After that, click on “Apply” and then on “OK“.

 

Apply Ok Min Min

 

7.  Now, go to this location –

C:\%ProgramData%\Microsoft\Windows\Start Menu\Programs\StartUp

 

8. In the Startup folder, copy-paste the “MapDrives.cmd” script inside the folder.

 

Map Drives Min

 

Close the folder.

9. Open the File Explorer again.

10. Go to this location-

%SystemDrive%\Scripts*

 

11. Then, paste the “MapDrives.ps1” PowerShell script here inside the Scripts folder.

 

Paste In Scripts

 

[

*NOTE– If you can’t see the Scripts folder in your system drive (usually the C: drive), do these –

a. Open the system drive.

b. Right-click on the folder and click on “New>” and click on “Folder“.

New Folder Min

 

c. Name the folder as “Scripts“.

]

Now, close all the opened windows. Sign out from your computer. Again, sign in to your account.
Once you have logged into your account, you will see the network drive on your computer. It won’t disconnect further.

 

Additional Tips

1. Recent Windows Updates may have caused this problem. Uninstall the latest update and try to map the network drive.

2. Try Autoruns to detect any startup items that are causing this problem.

ADVERTISEMENT

1 thought on “Network drive keeps disconnecting in Windows 10 / 11 Fix”

Comments are closed.