How do I prevent Windows 10 from disconnecting mapped drives?

1

I have a mapped drive on Windows 10 Enterprise that keeps disconnecting itself, sometimes even when I'm in the middle of doing things using files on that share. I have a desktop shortcut to it; if I click that after the drive has disconnected, I get this error message:

System dialog titled Problem with Shortcut, saying: 'The item that this shortcut refers to has been changed or moved, so this shortcut will no longer work properly. Do you want to delete this shortcut? Yes/No'

What's actually happening is that when I click the shortcut, the system re-maps the drive immediately, but not before displaying the error message. If I keep a "This PC" window open, I can see the drive appear in the list a moment later. So if I click "No", then the shortcut will work until Windows decides to disconnect the drive again, after which I'll have to go through the same stupid error message again.

When I created this mapped drive, I checked the "Reconnect at sign-in" box. It doesn't seem to have helped.

I have tried issuing the command net config server /autodisconnect:-1 to turn off automatic disconnecting; it had no effect.

I've tried deleting the mapping and recreating it with net use Z: \\sharename\path /user:SHIRE\baggins /persistent:yes, but the problem continues.

This is super-annoying, not just because of the "Problem with Shortcut" dialog, but because it keeps disrupting my work flow. Any open file explorer windows showing the mapped drive's contents get closed. If I have a file open in Notepad++, it will inform me that the file I'm editing no longer exists, and ask what to do with the copy in memory (keep/discard).

In case it's relevant, this particular share lives on a Linux server running Samba. I can post the config file for that if needed.

Any suggestions?

Will Martin

Posted 2016-10-18T17:22:10.507

Reputation: 821

Answers

0

Using: https://www.samba.org/samba/docs/using_samba/ch11.html

Try adjusting:

  • change notify timeout
  • deadtime

David T

Posted 2016-10-18T17:22:10.507

Reputation: 53

deadtime is set to zero, so there's no timeout. The notify timeout is for alerting clients to changed files in a folder, I think. I'm not sure its relevant. Thanks, though. – Will Martin – 2016-10-19T15:28:53.140