I’ve seen quite a few queries on this site for information about network drive mappings timing out and disconnecting. This is usually caused by settings on the server and is common on Windows 2000 and Windows 2003 servers. Microsoft sets the default timeout on network connections to disconnect after 15 minutes to preserve system resources. You can change this setting in the servers registry with regedit or at the command line. From the command line you can even disable it which adds a few more reg keys. You can’t disable it from a registry editor unless you add the keys that are missing.
I prefer the command line method to completely disabling the auto disconnect of the mapped drives. This may however disable the auto tuning features for some network settings that the registry provides the operating system. Microsoft recommends that you use the registry and as always, be careful, and make a backup.
Microsoft has a few articles on their website about this which can be found here.
Auto Disconnect Registry Editor Example:
Use Registry Editor to increase the default time-out period. To do this, follow these steps, and then quit Registry Editor:
- Click Start, click Run, type regedit or type regedt32 (Windows NT 4.0), and then click OK.
- Locate and then click the following key in the registry:
NOTE: The client side session is automatically disconnected when the idling time lasts more than the duration that is set in KeepConn. For this reason, the session is disconnected according to the less set duration value between AutoDisConnect and KeepConn. To modify the timeout duration in the client side during a UNC connection, specify the arbitrary time in KeepConn from registry value.
Locate and then click the following key in the registry:
Data type : REG_DWORD
Range : 1 to 65535 (sec)
Default value: 600 sec = 10 mins
- In the right pane, click the autodisconnect value, and then on the Edit menu, click Modify. If the autodisconnect value does not exist, follow these steps:
- On the Edit menu, point to New, and then click REG_DWORD.
- Type autodisconnect, and then press ENTER.
- On the Edit menu, click Modify.
- Click Hexadecimal.
- In the Value data box, type ffffffff, and then click OK.
Auto Disconnect Command Line Example:
For example, to set the Autodisconnect value to 30 minutes, you would run the following command line:
net config server /autodisconnect:30
The valid value range is -1 to 65535 minutes at the command line. To disable Autodisconnect set it to -1.
Setting Autodisconnect to 0 does not turn it off and results in very fast disconnects, within a few seconds of idle time. (However, the RAS Autodisconnect parameter is turned off if you set it to a value of 0.)
- It is preferable to modify the LAN Autodisconnect directly in the registry. If you modify it at the command line, Windows NT and Windows 2000 may turn off its autotuning functions. For additional information, click the article number below to view the article in the Microsoft Knowledge Base:
128167 (https://support.microsoft.com/kb/128167/EN-US/) Server Service Configuration and Tuning
The valid value range if you edit the LAN Autodisconnect parameter in the registry is 0 to 4294967295 (Oxffffffff).
- For a Windows 2000 Server in a Domain, running either as a domain controller or as a server, the maximum value is 65,535 (0xffff). Values set above this will be returned to 0xffff after policy refresh. Windows 2000 Servers in a workgroup may be set to any value as indicated.
If you configure the Autodisconnect option to -1 at the command prompt, Autodisconnect is set to the upper value in the registry. This is approximately 8,171 years (not tested), which should be long enough to be the equivalent of turning Autodisconnect off.
- The registry does not allow you to add a -1 value. However, that modification may be made at the command prompt with the following command:net config server /autodisconnect:-1When this is set, two additional registry keys are added:
anndelta: REG_DWORD: 0xbb8
announce: REG_DWORD: 0xf0
Announce: Specifies the network announce rate, in seconds. This rate determines how often the server is announced to other computers on the network.
Anndelta: Specifies the delta value for the announce rate, in milliseconds. This value specifies how much the announce rate can vary from the period of time specified in the announce member.
The delta value allows randomly varied announce rates. For example, if the announce member has the value 10 and the anndelta member has the value 1, the announce rate can vary from 9.999 seconds to 10.001 seconds.
Originally posted: By Cory Curtis on March 9th, 2009 at 11:12 pm