Windows 10: Task Schedule for network mapping reconnect after random disconnection

Discus and support Task Schedule for network mapping reconnect after random disconnection in Windows 10 Network and Sharing to solve the problem; Hi everyone, I have a challenge concerning a computer in a networt who randomly drops the network mappings so that the user cannot save his open docs... Discussion in 'Windows 10 Network and Sharing' started by TomFrankenbach, Jan 15, 2020.

  1. Task Schedule for network mapping reconnect after random disconnection


    Hi everyone,


    I have a challenge concerning a computer in a networt who randomly drops the network mappings so that the user cannot save his open docs anymore and loses his work and a lot of time.


    Our It service is not using Group Policies because of some software conflicts for our personalized apps, therefore we cannot use the Group Policy Method update instead of recreate.


    I did also the Regedit Modifications suggested in some forums

    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lanmanserver\parameters // autodisconnect value ffffffff

    KEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lanmanworkstation\parameters // KeepConn value 65535


    As well as the cmd commands

    net config server /autodisconnect:-1


    But after a while of working, the mapping drops again.


    The weird part - we map 2 folders from the same server with the letters w: and p:


    Mostly, only w: gets lost while p: is still available - and both point to the same server. only different subfolders


    So I wrote a basic .bat file that now runs every 5 minutes on the computer, as follows:


    net use w: \\server01\Data /persistent:yes
    net use p: \\server01\BEWShared /persistent:yes


    But, as the connection randomly drops, the risk is still that during the margins between the running task, the disconnect will happen.


    My question to you guys is:


    How if possible can i write a task schedule on Event : map disconnection - to launch the *.bat file ?


    That way, as soon as the event would be triggered, the task would be launched. This would be the most efficient way to "solve" the issue as long

    as we have not found the reason of the random disconnection.


    If anybody has another idea besides the task schedule - every suggestion is welcome except the group policy as the IT says we cannot switch because of our running software.... don't ask.


    Many thanks for your help & kind regards


    Tom

    :)
     
    TomFrankenbach, Jan 15, 2020
    #1

  2. Task Scheduler Tasks copy file to mapped network drive fails

    JR, is it possible that when run via task scheduler you don't have task scheduler set to run the task as the currently signed in user? If the task is run under another account, then P: will not be already mapped for that account.

    Sample:


    Task Schedule for network mapping reconnect after random disconnection [​IMG]
     
    hsehestedt, Jan 15, 2020
    #2
  3. HoKe(2) Win User
    Task Scheduler run task on specific network connection.Hol

    this is not really about powershell.

    it is about the list in the screenshot.

    there are several tens of network connection names.

    where are they stored? how can they be listed? how to maintain the list (delete some old once)

    I can start a task only if I choose "Any connection".

    when I choose any other connection I get error 'Task scheduler service is not available task scheduler will attempt to reconnect to it'

    this looks to be an issue of MS

    Task Scheduler Service Is Not Available
     
    HoKe(2), Jan 15, 2020
    #3
  4. Task Schedule for network mapping reconnect after random disconnection

    Task Scheduler Tasks copy file to mapped network drive fails

    JR, the only other thing that springs to mind is to make sure that the scheduled task is being run as the user that is currently logged on. You note that you are doing this, but make sure that the user name is in the form of machine_name\user_name (assuming that you are in a workgroup and not a domain).

    For confirmation, open a command prompt and run the command "whoami". The user name that you specify should look exactly like the output of that command.

    If that user is not logged on when the scheduled task is run, then you may need to add the "net use" command as you noted earlier to establish the connection and map the P: drive.

    - - - Updated - - -

    Here is a sample of what my working task looks like (tested while I am logged on as PYROMANIA\hanness):


    Task Schedule for network mapping reconnect after random disconnection [​IMG]

    Task Schedule for network mapping reconnect after random disconnection [​IMG]

    Task Schedule for network mapping reconnect after random disconnection [​IMG]


    Here are the contents of the actual batch file:

    Code:
     
    hsehestedt, Jan 15, 2020
    #4
Thema:

Task Schedule for network mapping reconnect after random disconnection

Loading...
  1. Task Schedule for network mapping reconnect after random disconnection - Similar Threads - Task Schedule network

  2. USB randomly disconnecting and reconnecting

    in Windows 10 Gaming
    USB randomly disconnecting and reconnecting: Someone, I need help. My USB devices started to disconnecting and reconnecting after a second. It happens randomly, and I don't know what it is related with.This issue occurred after I clean my PC. I knew what I did, I mean I didn't disconnect something, and now it's not...
  3. USB randomly disconnecting and reconnecting

    in Windows 10 Gaming
    USB randomly disconnecting and reconnecting: I've tried uninstalling drivers and reinstalling also I've tried going to an older build of Windows. Nothing seems to work. https://answers.microsoft.com/en-us/windows/forum/all/usb-randomly-disconnecting-and-reconnecting/07fe25f9-d507-4e37-846b-07e484de2213
  4. USB randomly disconnecting and reconnecting

    in Windows 10 BSOD Crashes and Debugging
    USB randomly disconnecting and reconnecting: I've tried uninstalling drivers and reinstalling also I've tried going to an older build of Windows. Nothing seems to work. https://answers.microsoft.com/en-us/windows/forum/all/usb-randomly-disconnecting-and-reconnecting/07fe25f9-d507-4e37-846b-07e484de2213
  5. USB randomly disconnecting and reconnecting

    in Windows 10 Software and Apps
    USB randomly disconnecting and reconnecting: I've tried uninstalling drivers and reinstalling also I've tried going to an older build of Windows. Nothing seems to work. https://answers.microsoft.com/en-us/windows/forum/all/usb-randomly-disconnecting-and-reconnecting/07fe25f9-d507-4e37-846b-07e484de2213
  6. Mapped Network Drive Disconnects and Will Not Reconnect

    in Windows 10 Network and Sharing
    Mapped Network Drive Disconnects and Will Not Reconnect: OS:Windows 10 V20H2 PC: Dell XPS8940 Router: Netgear R7000 w/ TomatoUSB Nine of ten mapped network drives on my desktop PC behave normally! The tenth is a problem. It is mapped to the USB drive connected to my router.Sometimes (days) I cannot connect to this mapped drive and...
  7. USB Disconnect/Reconnect at random

    in Windows 10 Ask Insider
    USB Disconnect/Reconnect at random: So I've been having a chronic issue that for a while hasn't popped up, but has today become absolutely insufferable. Occasionally, my pc will just, at random, decide to disconnect and then reconnect three of my devices connected to my USB ports. I have a total of four...
  8. mapped network drives not reconnecting

    in Windows 10 Network and Sharing
    mapped network drives not reconnecting: I have a NAS box with folders mapped as X, Y, Z. Windows 10 Home 20H2 build 19042.630 I've followed the steps here https://support.microsoft.com/en-gb/help/4471218/mapped-network-drive-may-fail-to-reconnect-in-windows-10-version-1809 The drives still fail to connect....
  9. Task Scheduler Tasks copy file to mapped network drive fails

    in Windows 10 Network and Sharing
    Task Scheduler Tasks copy file to mapped network drive fails: I've read a dozen or so of the posts regarding Task Scheduler issues - so far haven't seen my issue solved. Tasks which functioned more-or-less in W7 were saved, then imported to a new PC with a fresh install of W10. They seem to have imported intact. They all call batch...
  10. Network Disconnect and Reconnect

    in Windows 10 Network and Sharing
    Network Disconnect and Reconnect: 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 Network Connection Network...