Sửa lỗi could not reconnect all network drives bawngf registry năm 2024

As City employees, we see the result of our work all around us— in street and infrastructure improvements, new buildings rising from the ground, safer and more prosperous neighborhoods, and happier, healthier children, families, and senior citizens. What we do at work today shapes the Boston of tomorrow.

Sửa lỗi could not reconnect all network drives bawngf registry năm 2024

We Serve With Pride

Public service is a noble calling: to help others, to make our community stronger, and to uphold the public's trust. The call to serve is rooted in instinct and constantly honed through awareness, empathy, and action. In choosing this path, we find our own lives enriched and our purpose fulfilled.

Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.

Mapped network drive may fail to reconnect in Windows 10, version 1809

  • Article
  • 12/26/2023

In this article

This article provides a workaround for the issue that mapped network drive may fail to reconnect in Windows 10, version 1809.

Applies to: Windows 10, version 1809 Original KB number: 4471218

Symptoms

You experience the following issues in Windows 10, version 1809:

  • In Windows Explorer, a red X appears on the mapped network drives.
  • Mapped network drives are displayed as Unavailable when you run the net use command at a command prompt.
  • In the notification area, a notification displays the following message:
    Could not reconnect all network drives.

Workaround

Microsoft is working on a resolution and estimates a solution will be available by the end of November 2018. Monitor the mapped drive topic in the Windows 10 1809 Update History KB 4464619. Currently, you can work around this issue by running scripts to automatically reconnect mapped network drive when you log on the device. To do this, create two script files, and then use one of the workarounds, as appropriate.

Create a script file named MapDrives.cmd

The file should be run at a regular but not at an elevated command prompt because it should be run at the same privilege as Windows Explorer:

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

Create a script file named MapDrives.ps1

The file should be run at a regular but not at an elevated command prompt because it should be run at the same privilege as Windows Explorer:

$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
}

Workarounds

All workarounds should be executed in standard user security context. Executing scripts in an elevated security context will prevent mapped drives from being available in the standard user context.

Workaround 1: Create a startup item

Note

This workaround works only for the device that has network access at logon. If the device has not established a network connection by the time of logon, the startup script won't automatically reconnect network drives.

The Windows OS automatically recognizes connected external devices and map them accordingly. This saves you from the hassle of mapping external network drives manually. However, at times due to issues with the User Account Control, you may encounter the could not reconnect all network drives error.

A simple disconnect and reconnect of network drives can help you resolve this error. However, if that does not work, you can configure the Logon policy using the Group Policy Editor to resolve the error. Here we will discuss this and more solutions to fix the could not reconnect all network driver error in Windows.

1. Install the Latest Windows Updates

Sửa lỗi could not reconnect all network drives bawngf registry năm 2024

Microsoft recommends installing the latest update to fix the problem on an older version of a Windows computer. Check if you have a new feature update available in the update center and install them to see if that helps fix the error.

To install Windows 11 updates:

  1. Press Win + I to open Settings.
  2. Open the Windows Update tab in the left pane.
  3. Click on Check for updates. Windows will scan for and show pending updates.
  4. Click on Download & install and wait for the update to complete the installation.
  5. Once installed, restart your PC and check for any improvements.

2. Disconnect the Network Drives

Sửa lỗi could not reconnect all network drives bawngf registry năm 2024

If you know which drive is causing the error, a simple disconnect and reconnect can help you resolve the error.

To disconnect the drive:

  1. Press Win + E to open File Explorer.
  2. In the left pane, right-click on This PC and select Disconnect Network Drive. In Windows 11, select Show more options to view the disconnect drive option.
  3. Windows will display all the network drives connected to your system.
  4. Select the drive you want to disconnect and click OK.

3. Force Windows to Wait for the Network on Computer Startup

As discussed previously, the could not reconnect all network drives error often occurs due to automatic mapping of network drives. To resolve this, you can make Windows wait for the network at the computer startup and log on using Group Policy Editor.

Note that Group Policy Editor is only available on Windows Pro, Edu, and Enterprise editions of the OS. Read our guide on how to enable GPEdit on Windows Home if you are using the Home edition of the OS, and then proceed with the steps below.

To change the Logon policy using GPEdit:

  1. Press Win + R to open Run.
  2. Type gpedit.msc and click OK to open Group Polict Editor.
    Sửa lỗi could not reconnect all network drives bawngf registry năm 2024
  3. In Local Group Policy Editor, navigate to the following policy:
        Computer Configuration > Administrative Templates > System > Logon
  4. In the right pane, locate and double-click on Always for the network at computer startup and logon policy.
    Sửa lỗi could not reconnect all network drives bawngf registry năm 2024
  5. In the pop-up dialog, select Enabled.
  6. Click Apply and OK to save the changes.

4. Map Drives Using a Batch Script

If tweaking the logon policy in Group Policy Editor did not help, you can use a batch script to fix this error. This method involves creating a new batch script for Command Prompt and PowerShell that will run at startup and map the necessary drives.

To create a batch script to map drives in Windows:

  1. Open a new Notepad file. To do this, press Win + R to open Run, type notepad, and click OK.
    Sửa lỗi could not reconnect all network drives bawngf registry năm 2024
  2. Next, copy and paste the following script:
        PowerShell -Command "Set-ExecutionPolicy -Scope CurrentUser Unrestricted" >> "%TEMP%\StartupLog.txt" 2>&1  
    
    PowerShell -File "%SystemDrive%\Scripts\MapDrives.ps1" >> "%TEMP%\StartupLog.txt" 2>&1
  3. Next, press Ctrl + S to open the Save dialog.
    Sửa lỗi could not reconnect all network drives bawngf registry năm 2024
  4. For the File name, type batch.cmd.
  5. Next, click the Save as type drop-down and select All Files.
  6. Click Save to save the file.
  7. Next, we will create a powershell script. To do this, open a new Notepad file.
    Sửa lỗi could not reconnect all network drives bawngf registry năm 2024
  8. In the Notepad file, copy and paste the following script:
        $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 }

  9. Again, press Ctrl + S to open the Save dialog.
  10. Here, type MapDrives.ps1 as the file name.
  11. Next, click the drop-down for Save as type and select All Files.
    Sửa lỗi could not reconnect all network drives bawngf registry năm 2024
  12. Click Save to save the file.
  13. Next, you need to move the batch.cmd file to the Startup folder of your Windows computer.
  14. To do this, press Win + R to open Run.
  15. Next, copy and paste the following path to access the Startup folder:
        C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp
  16. Move the batch.cmd file to the Startup folder.
  17. Next, press Win + E to open File Explorer. In the left pane, click on Windows C under This PC to access the C:\\ drive.
  18. Right-click and select New > Folder.
  19. Rename the folder as Scripts.
  20. Now, move the MapDrives.ps1 file to the Scripts folder.

Once done, restart your PC. Windows will run the MapDrives script automatically when the PC restarts and resolve the error could not reconnect all network drives.

5. Use Task Scheduler to Run the Script

If, for some reason, Windows fails to run the MapDrives.ps1 script during startup, you can use the Task Scheduler to perform this task. All you have to do is create a new task to start a program and set it to run the MapDrives script created earlier. Here’s how to do it.

  1. Press the Win key, and type task scheduler. Then, click on Task Scheduler to launch the program.
  2. Next, click on Action and then click on Create Task.
    Sửa lỗi could not reconnect all network drives bawngf registry năm 2024
  3. In the Name field, type a name for the task.
    Sửa lỗi could not reconnect all network drives bawngf registry năm 2024
  4. Next, click on Change User or Group option under Security options.
  5. Type the username or group you want to assign the task to and click Check Names.
  6. Once done, click OK.
    Sửa lỗi could not reconnect all network drives bawngf registry năm 2024
  7. Next, select the Run with the highest privileges option under Security options.
  8. Next, open the Triggers tab.
  9. Click on New.
  10. Click the Begin the task drop-down and select At log on.
  11. Next, open the Actions tab and click the New button.
    Sửa lỗi could not reconnect all network drives bawngf registry năm 2024
  12. Here make sure the Action drop-down is set to Start a program.
  13. Next, click on the Browse button.
    Sửa lỗi could not reconnect all network drives bawngf registry năm 2024
  14. Now select the MapDrives.ps1 script you created in the previous step and click Open.
  15. In the Add arguments field, type the following:
        -windowsstyle hidden -command .\MapDrives.ps1 >> %TEMP%\StartupLog.txt 2>&1
  16. Next, in the Start in field, type the following: %SystemDrive%\Scripts\
  17. Click OK to save the changes.
  18. Next, open the Conditions tab.
    Sửa lỗi could not reconnect all network drives bawngf registry năm 2024
  19. Here, select the Start only if the following network is available option.
  20. In the drop-down below, select Any connection
  21. Click OK to save the changes.

Finally, restart your PC to apply the changes. Task Scheduler will work similarly to the Command Prompt script added to the Startup folder and run the script to map drives during logon.

6. Disable The Network Drive Notification Using Registry Editor

If you want to stop the could not reconnect all network drives notification, you can do it by tweaking a registry entry. Here’s how to do it.

Note that incorrect modification to registry entries can cause system malfunction. We recommend you create a system restore point before proceeding with the steps below.

Alternatively, you can also enable automatic registry backups in Windows 11 to be on the safer side.

Once done, proceed with the steps below to disable could not reconnect all network drives notifications in Windows.

  1. Press Win + R to open Run.
  2. Type regedit and click OK to open Registry Editor. Click Yes when prompted by UAC.
  3. In the Registry Editor, navigate to the following location:
        HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\NetworkProvider
  4. In the right pane, look for the RestoreConnection value. If it doesn’t exist, you will need to create a new value.
  5. To create a new value, right-click on the NetworkProvider key and select New > DWORD (32-bit) Value.
    Sửa lỗi could not reconnect all network drives bawngf registry năm 2024
  6. Rename the value as RestoreConnection.
  7. Right-click on RestoreConnection and select Modify.
    Sửa lỗi could not reconnect all network drives bawngf registry năm 2024
  8. In the Value data field, type 0 and click OK to save the changes.

Close the Registry Editor and restart your PC. While this will not resolve the error, it will likely prevent the annoying error notification popup each time you log in.

Resolve the "Could Not Reconnect All Network Drives" Error in Windows

While the troubleshooting tips in the article are useful, you can also use a third-party network drive manager for the correct management of network drives. These tools ensure network drives get properly connected after logon and minimize the chances of network drive-related errors.

Could not Reconnect All Network Drives là gì?

Không thể kết nối lại tất cả các ổ đĩa mạng. Lưu ý Thông báo này là không chính xác, ổ đĩa được ánh xạ thực sự thành công.nullLỗi "Không thể kết nối ổ đĩa mạng tất cả" sau khi bạn triển khai chính ...support.microsoft.com › vi-vn › topic › lỗi-không-thể-kết-nối-ổ-đĩa-mạng...null