1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Windows 2000 Login Script: Disconnect erroneously mapped drives

Discussion in 'Networking' started by coders4hire, May 28, 2004.

Thread Status:
Not open for further replies.
  1. coders4hire

    coders4hire Thread Starter

    Joined:
    May 28, 2004
    Messages:
    1
    :cool: Our users sometimes map drives temporarily and forget to unmap them. I'd like to add something which verifies the existance of a drive or the mapping will be removed. Something like (before we map the mandatory drives):

    For each mapped drive, check and see if it can connect. If it's not, then disconnect.

    Thanks
     
  2. Squashman

    Squashman Trusted Advisor

    Joined:
    Apr 4, 2003
    Messages:
    19,783
    net use * /d /y
     
  3. Bob Cerelli

    Bob Cerelli

    Joined:
    Nov 2, 2002
    Messages:
    22,468
    If you want to keep some mapped drives rather than remove all of them, and just test to see which are really being used, you can run simple batch file:

    if not exist x:\nul net use x: /d /y

    substitue x: for whatever drive letter you want to test for.

    Hopefully this will give you a little more flexibility if you require it.
     
As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/233547

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice