1

I'm looking for a way to unmap network drives when the screen saver turns on.

I have a few users that share an external, encrypted drive (Samba share, not windows) and they have a requirement to disconnect the drive mapping when the local machine is idle. I'd also like it to warn them if there are open files on the mapped drive, if possible.

There is also a requirement to force the password to be reentered before mapping when the machine comes back from idle.

Is there a Windows setting or utility out there in the wild that meets these requirements?

Edit:

FWIW, I haven't seen an answer that makes me completely happy yet, so I'm not awarding the bounty...

JimR
  • 788

3 Answers3

1

To break the net connection, just schedule a similar .bat file every few minutes :

@echo off
tasklist | find /i ".scr" && net use x: /delete

If necessary, you can hide the .bat file by using this answer.

But just to remark that I take no responsibility for what happens when the other users of this computer lose their work because of this disconnect.

harrymc
  • 498,455
0

This actually only works under 7, My bad.

You should be able to use windows scheduler to run a script to break the connection on a defined idle threshold. Or on lock, or unlock, whatever tickles your fancy.

(Control Panel->Admin Tools->Scheduler)

0

Even if you do find a nice way to disconnect the network drive every time they screensaver kicks in, it won't do what you want it to do.

  1. Windows remembers the credentials you used to mount a network share, until you log off. Furthermore, users can click "remember credentials" and it won't ever ask them at all. Even if you dismount the drive, as soon as they try to remount it, it will just use the cached credentials.

  2. Why would you want to do this anyhow? This will only serve to aggravate your users, and I see no way in which it will enhance security. You are much more likely to lose data from some disconnect-the-drive scheme than you are to lose it to some attacker who comes up to a computer while it's idle, steals sensitive data, and then runs away before anybody notices.

  3. When your users get ticked off that every time the screensaver turns on everything gets disconnected, they will turn off the screensaver. When you force a certain time limit on the screensaver, they will find a way around that too.

If your goal is to protect sensitive documents, you are much, much better off forcing users to enter their password when the computer resumes. This would allow them to keep documents open and not lose their place, leading to better productivity and happier workers. It's also super easy to do with tools built into Windows.

nhinkle
  • 37,661