Remote disconnection re-connection

Posted on 2004-11-23
Last Modified: 2010-04-10
I need to force a disconnection / reconnection of a mpapped drive within my environment (Which is a WAN) but do not want to have to visit every machine to do it.

Machine1 is a small desktop that acts as a login server for an application within our business. This server still runs on NT4, the client machines are all XP Pro (SP1)

I have been unable to update some records as I was unable to write to the files as the trust had been broken between the XP & NT networks. This trust is not being re-established  - political reasons within the business groups :-(   - I then modified the permissions on the NT box, rebooted my client PC and re tried updating records held on the server. This failed.

I then did a manual network disconnect & re-connect and re-tested and all was ok. I am therefore surmising that a reboot on a client machine with a mapped network drive set to 're-connect at log on' doesn't actually disconnect during the re-boot phase. So, does anyone out there have any suggestions on how to force a disconnection / re-connection remotely without an input from the userbase?

Question by:thebusies
    LVL 7

    Expert Comment

    If all you need for them to do is force disconnect and reconnect on logon and/or reboot, then a simple batch file with net use /delete then net use to re-map will solve your problem.  Otherwise, you'll need to use server manager and some remote scripting.  Either way is possible.  For the server manager to work, you'll need some administrative type access to the clients (you'll need access to remote control the system services)
    LVL 7

    Accepted Solution

    FYI - to use the batch file method, use the following syntax, where z: is your network drive

    Net Use z: /delete
    Net Use z: \\servername\sharename

    Copy that to a file called connect.bat or whatever you want to name it as long as it's .BAT, then drop that file in the All Users->Start Menu->Programs->Startup folder .

    Author Comment

    I love a simple straight-forward answer as I am a straight-foward  simple sort of guy
    Thanks Focusyn

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Why You Should Analyze Threat Actor TTPs

    After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

    Even if you have implemented a Mobile Device Management solution company wide, it is a good idea to make sure you are taking into account all of the major risks to your electronic protected health information (ePHI).
    PRTG Network Monitor lets you monitor your bandwidth usage, so you know who is using up your bandwidth, and what they're using it for.
    After creating this article (, I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
    This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor ( If you're looking for how to monitor bandwidth using netflow or packet s…

    760 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    8 Experts available now in Live!

    Get 1:1 Help Now