topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Tuesday April 23, 2024, 6:15 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: IDEA: Re-establish connection on connected windows network shares/mapped drives  (Read 5799 times)

GSz

  • Supporting Member
  • Joined in 2008
  • **
  • Posts: 30
    • View Profile
    • Read more about this member.
    • Donate to Member
Hi all,

I can't seem to find a simple command line solution for the issue.

I use 3 "endpoints" on my home network:
- a desktop
- a laptop
- a Networked Media Tank (media streamer)

I have mapped network drive on both desktop and laptop pointing to the other computer and the NMT.
Sometimes the mapped drives get to a disconnected/unavilable state (when running "net use" from command line) and can't be accessed from certain application or the command line.

The only way to "refresh" the connection - without removing it and re-establishing it - is either to open Windows Explorer and click on the drive (I also use Total Commander, which works also).
But I can't find a good command line solution where I give it the drive letter, and it makes sure it's connected.

What I'm looking for is a command line tool that will act as described above, for example:
  refresh-smb-drive T:

will make sure T: is connected and active before returning control.

Hope this is simple enough for you excellent and bright guys.

Thanks in advance
Gal Szkolnik
- Sincerely
    Lockszmith

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,286
    • View Profile
    • Donate to Member
You could write a simple ahk script (or even a batch file) that will delete and re-add the drive.

Innuendo

  • Charter Member
  • Joined in 2005
  • ***
  • default avatar
  • Posts: 2,266
    • View Profile
    • Donate to Member
Sometimes the mapped drives get to a disconnected/unavilable state (when running "net use" from command line) and can't be accessed from certain application or the command line.

If this is what I am thinking of then this has always been a very irritating bug. If you have plans to upgrade to Windows 7 you'll be pleased to know that this irritation has finally been fixed.

The cause and work-around for anything before Windows 7 is that when Windows tries to connect to a mapped drive the first thing it usually tries to do is connect using the credentials of the user logged on to Windows at the time. If the credentials don't match then you get the disconnected behavior you have experienced. The work-around is to have the log-ons for your mapped devices match your Windows logon. It's a pain, but it works.

GSz

  • Supporting Member
  • Joined in 2008
  • **
  • Posts: 30
    • View Profile
    • Read more about this member.
    • Donate to Member
Thanks for all the suggestions.

I have found this Shareware solution, which seems like exactly what I was looking for.

It's a replacement management console for controlling network mounts - with an added value of re-mounting TrueCrypt drives which are avilable on network mounts.

A bit of overkill for what I wanted, but as of now it's the only solution I found that keeps the network mounted drive live.

Check it out here: http://www.suncross.nl/ndm/

I wonder if there is a DonationCoder out there who can make a simpler/smaller (maybe better suited) solution instead of NDM.

I'll test-drive the new software, and let you know if it does what it should.

Gal Szkolnik
- Sincerely
    Lockszmith