Windows 10: Mapping OneDrive: Could Not Reconnect to All Network Drives Solved

  1.    09 Sep 2015 #1

    Mapping OneDrive: Could Not Reconnect to All Network Drives


    I've mapped OneDrive to use it as a backup storage per instruction here, but I get the said error every time I reboot. So I wrote a simple batch script to remap automatically when I logon to Windows.

    Usage: MapOneDrive.cmd [Number of checks] "[IPv4 to ping]" "[Drive letter]" "[OneDrive CID]" "[Username]" "[Password]"

    Example: MapOneDrive.cmd 60 "8.8.8.8" "Z" "123456789" "bulldog@live.net" "pwd123"

    The value "60" is the number of pings -- once per loop. A single loop is a little over a second.

    Save the following as "MapOneDrive.cmd". Create a shortcut to it with all the necessary information therein, then put it in the startup folder.

    Code:
    @ECHO OFF
    
    GOTO START
    
    :HELP
    ECHO.
    ECHO Usage: MapOneDrive.cmd [Number of checks] "[IP to ping]" "[Drive letter]" "[OneDrive CID]" "[Username]" "[Password]"
    ECHO.
    PAUSE
    GOTO END
    
    :START
    IF "%~1" == "/?" GOTO HELP
    IF "%~6" == "" (
        ECHO Something is missing!
        GOTO HELP
    )
    
    SETLOCAL
    SET count=0
    SET loop=%1
    
    :PING
    TIMEOUT /T 1 >nul
    SET /A count=count+1
    PING -4 -n 1 %2 | find "Reply from" >nul
    GOTO CHECK
    
    :CHECK
    IF NOT ERRORLEVEL 1 ( 
        GOTO MAP
    ) ELSE (
        IF %count% LSS %loop% (
            GOTO PING
        ) ELSE (
            GOTO END
        )
    )
    
    :MAP
    ECHO Mapping drive %3 in progress...
    NET USE %3: "https://d.docs.live.net/%4" /user:%5 %6 /persistent:yes
    GOTO END
    
    :END
    ENDLOCAL
    Hope you'll find it useful!
    Last edited by Taurean75; 12 Sep 2015 at 12:25.
      My ComputerSystem Spec


 

Related Threads
Quick Access for Network Drives in Network and Sharing
I am having problem adding folders from a network drive to the Quick Access. Firstly I can only drag and drop into the QA in explorer, as right clicking option doesn't work and it only allows one folder at a time to be included. Local folders are...
I cant connect to network drives in Network and Sharing
it was working back on 10049 and then i updated to 10051 and it still was working fine. but recently i did a fresh install and now i can re add a network device i have a "New" Nintendo 3ds and i cant setup the MicroSD management which requires...
Solved Network Disconnect and Reconnect in Network and Sharing
Hello Since upgrading to Windows 10 I been getting random network disconnects? in Event Viewer I get load of these errors Event 27 Intel(R) 82579V Gigabit Network Connection Network link is disconnected. Event 33 Intel(R) 82579V Gigabit...
Something annoying, and since I have seen it for so many years I suspect there has to be a fix - Upon starting any of the wifi laptops I almost always get the error that all networked drives couldn't reconnect. If I give it 20 seconds or so I can...
Solved network mapping in win explorer in Network and Sharing
:( Has anyone found any fixes for the several problems with network mapping?

Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd
All times are GMT -5. The time now is 06:49.
Find Us