The “OneDrive Cannot Connect to Windows” error message shown when the user trying to access files in the OneDrive folder if the user has previously enabled Files On-Demand in OneDrive settings.
[Solved] How to Fix “OneDrive Cannot Connect to Windows” Error
OneDrive cannot connect to Windows. Files On-Demand requires a connection to Windows in order to show your files without taking up space on this device. OneDrive can keep trying to connect to Windows or you can choose to download all your files. You won't be able to use online-only files until this is fixed.
Follow the below steps to resolve this error.
Content Summary
Solution 1: Update Windows to the latest version
Solution 2: Unlink Onedrive account
Solution 3: Do TCP/IP Reset
Solution 4: Modify Internet Properties
Solution 5: Enable the cldflt.sys driver
Solution 6: Attach Sync Folder
Solution 7: Disable or uninstall 3rd party antivirus and firewall software
Solution 8: Reset OneDrive App
Solution 9: Reinstall OneDrive App
Solution 1: Update Windows to the latest version
Most of the older build of Windows 10 affected by a bug that interrupts communications between the cloud server and the local synchronization feature of OneDrive. Apply the latest available Windows update to fix the ‘OneDrive Cannot Connect to Windows‘ error.
Step 1: Press Windows key + R to open the Run box.
Step 2: Type ms-settings:windowsupdate
and press Enter to open the Windows Update tab of the Settings app.
* If you are updating Windows 7 or Windows 8.1 to the latest version then use wuapp
command instead.
Step 3: Click on Check for updates button then follow the on-screen prompts to complete the installation of Windows update.
Step 4: Restart the computer after the update completed.
Solution 2: Unlink Onedrive account
This error can trigger in those instances where the Files On-Demand feature was activated but the synchronization location set to a USB drive or external HDD / SSD which is not fully supported by OneDrive. You can fix the issue by unlinking the computer from the OneDrive account then re-add the account again to force the path to refresh.
If you have been using the OneDrive sync client without Files On-Demand and then enable Files On-Demand, some users have reported that they received an error “OneDrive cannot connect to Windows” preventing them from enabling Files On-Demand:
This is because the sync location being used is not the local hard drive and instead is using either an external USB or hard drive which cannot be used for the OneDrive sync location. You will need to go to OneDrive sync client settings tab (from the sys tray), on the Account tab unlink the PC from the account and then add the account again but this time select the local hard drive as the sync location.
Step 1: Click on the OneDrive icon in the taskbar icon (systray) and select on More > Settings.
Step 2: Click the Account tab then click on Unlink this PC link to remove the current account.
Step 3: Click on Unlink Account once again to confirm the operation.
Step 4: Restart the computer to clear any temp data.
Step 5: After computer bootup, open OneDrive again and enter your credentials to sync your account with the PC once again.
Step 6: Ensure that local drive is selected if prompt to select which location to use for OneDrive.
Solution 3: Do TCP/IP Reset
Common network inconsistencies such as bad Gateway or dynamic IP changing too often will trigger this error message as well.
Step 1: Press Windows key + R to open the Run box.
Step 2: Type cmd
and press Ctrl + Shift + Enter to open Command Prompt window with admin access. If the User Account Control (UAC) window prompt, click Yes to grant administrative privileges to the CMD terminal.
Step 3: Type the following commands and press Enter after each one to do a complete TCP/IP reset:
netsh int ip reset
netsh winsock reset
ipconfig /release
ipconfig /renew
ipconfig /flushdns
Step 4: Restart the computer.
Solution 4: Modify Internet Properties
Step 1: Press Windows keys Win + R to open the Run box.
Step 2: Type inetcpl.cpl
in the Run box and press Enter key to launch the Internet Properties.
Step 3: Choose the Advanced tab. Make sure Use TLS 1.0, Use TLS 1.1, and Use TLS 1.2 options are checked, then click on the Apply button.
Step 4: Go to the Connections tab. Click the LAN settings button below. Check the Automatically detect settings option and uncheck the Use a Proxy Server for your LAN option then click the OK.
Step 5: Click the Apply and then OK button to exit.
Step 6: Restart the computer.
Solution 5: Enable the cldflt.sys driver
When the Files on Demand feature in OneDrive is enabled but the cldflt.sys driver is not enabled, this error occurs. Follow the below guide to force cldflt.sys driver to run manually using elevated command prompt.
Step 1: Press Windows key + R to open the Run box.
Step 2: Type cmd
and press Ctrl + Shift + Enter to open Command Prompt window with admin access. If the User Account Control (UAC) window prompt, click Yes to grant administrative privileges to the CMD terminal.
Command Prompt Run as Administrator
Step 3: Type the following commands and press Enter to navigate to the location where the cldflt.sys driver present: cd %systemroot%\system32\drivers
Step 4: Type the following command and press Enter to inquire about the cldflt.sys drive: sc query cldflt
Navigate to cldflt and query.
Step 5: Under Service_Name: cldflt, look at the STATE. If the state is not 4, change the state of cldflt.sys to automatically run.
Check cldflt STATE
Step 6: Type the following command to enable the service directly from this terminal window: sc config cldflt start=auto
Change the state of cldflt.sys to automatically run
Step 7: Restart the computer.
Solution 6: Attach Sync Folder
Step 1: Press Windows key + R to open the Run box.
Step 2: Type cmd
and press Ctrl + Shift + Enter to open Command Prompt window with admin access. Click Yes to grant administrative privileges to the CMD terminal if the User Account Control (UAC) window prompted.
Step 3: Type the following commands and press Enter: reg query "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Notifications\Data" /v 41960B29A3BC0C75
Step 4: If the output is not showing REG_BINARY 0100000001000000
, then proceed to the next step. If the output is empty, navigate to the location in the registry and create the key.
Step 5: Type the following commands and press Enter: Fltmc attach cldflt c:
* c: refer to the drive where the OneDrive folder is located.
Step 6: Restart the PC.
Solution 7: Disable or Uninstall 3rd party antivirus and firewall software
Start by disabling real-time protection and see if the syncing issue stops occurring. In case the issue remains even after disabled the active protection, you might need to consider temporarily uninstalling the 3rd party suite to ensure that there is no antivirus interference.
We fixed an issue resulting in Insiders with certain third party antiviruses and OneDrive Files on Demand enabled seeing an error in recent builds citing “OneDrive cannot connect to Windows”.
Source: Microsoft Windows Blog > Announcing Windows 10 Insider Preview Build 17046 for PC
Solution 8: Reset OneDrive App
Step 1: Press Windows key + R to open the Run box.
Step 2: Type %localappdata%\Microsoft\OneDrive\onedrive.exe /reset
and press Enter.
Reset OneDrive Application
* “%localappdata%” refer to “%USERPROFILE%\AppData\Local”. For example c:\users\alex\AppData\Local
Step 3: Wait for the Microsoft OneDrive icon appearing in the notification area. If it does not appear, paste the command to the Run: %localappdata%\Microsoft\OneDrive\onedrive.exe
.
Solution 9: Reinstall OneDrive App
Step 1: Press Windows key + R to open the Run box.
Step 2: Type cmd
and press Ctrl + Shift + Enter to open Command Prompt window with admin access. If the User Account Control (UAC) window prompt, click Yes to grant administrative privileges to the CMD terminal.
Step 3: Type appwiz.cpl
and press Enter to open Add/Remove Programs.
Step 4: Locate the Microsoft OneDrive app from the list and right-click it then choose Uninstall.
Step 5: Restart the computer.
Step 6: Visit the OneDrive Download page and select the need to reinstall/download hyperlink to commence the reinstallation process.
Step 7: Restart the computer after OneDrive installation completed.
Source: Microsoft Support > “OneDrive cannot connect to Windows” error when accessing files in OneDrive