batch file to disable network share on Windows XP

Posted by Robb on Super User See other posts from Super User or by Robb
Published on 2011-06-24T16:06:04Z Indexed on 2011/06/24 16:25 UTC
Read the original article Hit count: 160

Loosely related to this question Network Share causing Cygwin to run slowly after 'ls', I'd like to write a little batch file that I can execute to disconnect the host from any network shares and subsequently another batch file to reconnect. Ideally, this would be something that I can execute from a PuTTY terminal, SSHed into the box running cygwin.

I'm pretty sure the batch files can be written easily, but I don't know about executing them from a PuTTY terminal. Regardless, I'd still like the batchfiles anyways.

For the sake of simplicity my process would be:

  1. Log into server via PuTTY
  2. Run batch files to disconnect shares
  3. Do what I need to do
  4. Run batch files to reconnect shares
  5. Exit session, closing PuTTY

© Super User or respective owner

Related posts about windows-xp

Related posts about network-shares