Navigate the the location below in your registry and make the corresponding change.

Create or edit the existing DWORD value named 'Autodisconnect' to equal the time in minutes before a session is disconnected.

Restart Windows. 

To disable Auto disconnects set the value to 'Oxffffffff'. 

Key:[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters]
Value Name: Autodisconnect
Data Type: REG_DWORD
Data:0 to 4,294,967,295 (Oxffffffff) in minutes

 

Back to Network and Internet Tweaks