You can update the Mapped Drive settings and fix mapped drive disconnect issues by using the Group Policy Editor, Registry Editor, or via the command line.

Via Goup Policy(gpedit.msc)

  1. Run group policy editor and select:
    User Configuration --> Preferences --> Windows Settings --> Drive Maps
  2. Change Action on the selected drive to “Update” and Apply.

Via Registry

In this method, we need to change a few variables to fix the disconnecting drives.
We first need to set the default time-out period related to the autodisconnect feature.
  1. Run regedit.exe
  2. Locate and then select this registry key:
  1. In the right pane, click the autodisconnect value. Select the Edit menu, and click Modify.
    *If the autodisconnect value does not exist, create it by:
    1. Selecting the Edit menu àNew, and then click REG_DWORD.
    2. Type autodisconnect, and press ENTER.
  2. On the Edit menu, click Modify.
  3. Click Hexadecimal.
  4. Type FFFFFFFF In the Value data box and click OK.
The client-side sessions automatically disconnect when the idling time exceeds the KeepConn value. Therefore, the session is disconnected based on the shorter value between AutoDisConnect and KeepConn. To change the time-out duration client-side(during a UNC connection), specify an arbitrary time in KeepConn.
    1. Locate and select this registry key:

Variable name/Value: KeepConn
Data type : REG_DWORD
Accepted Range : 1 to 65535 (sec)
Default value: 600 sec = 10 mins
    1. Change the value to your desired time.

Via Command Line

Before we begin, note that if you use this method, the auto-tuning feature for the Server service no longer needs to be active. You can either set an arbitrary value for Autodisconnect or deactivate this feature.
  1. Changing the default time-out period(Autodisconnect feature in Server service)
  1. Run “cmd.exe” and on the command line type:

net config server /autodisconnect:[number]

*NOTE: [number] is the number of minutes before a mapped drive disconnects. Maximum value is up to: 65,535.

*SPECIAL NOTE: If you set the autodisconnect value to 0 (zero), mapped drives disconnects after a few seconds of idle time. This does not deactivate this feature.
  1. Switch off the autodisconnect feature by running this on the command line:
net config server /autodisconnect:-1