Welcome Guest.   Make a donation to an author on the site October 24, 2014, 10:30:50 AM  *

Please login or register.
Or did you miss your validation email?


Login with username and password (forgot your password?)
Why not become a lifetime supporting member of the site with a one-time donation of any amount? Your donation entitles you to a ton of additional benefits, including access to exclusive discounts and downloads, the ability to enter monthly free software drawings, and a single non-expiring license key for all of our programs.


You must sign up here before you can post and access some areas of the site. Registration is totally free and confidential.
 
The N.A.N.Y. Challenge 2010! Download 24 custom programs!
   
   Forum Home   Thread Marks Chat! Downloads Search Login Register  
Pages: [1]   Go Down
  Reply  |  New Topic  |  Print  
Author Topic: IDEA: Re-establish connection on connected windows network shares/mapped drives  (Read 2741 times)
GSz
Supporting Member
**
Posts: 21


see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« on: October 24, 2009, 02:47:23 PM »

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
Logged

- Truly Yours
    Gal Szkolnik
skwire
Global Moderator
*****
Posts: 4,114



Another Coding Snack request? Om nom nom...

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #1 on: October 24, 2009, 03:59:47 PM »

You could write a simple ahk script (or even a batch file) that will delete and re-add the drive.
Logged

Innuendo
Charter Member
***
Posts: 1,924

View Profile Give some DonationCredits to this forum member
« Reply #2 on: October 25, 2009, 11:01:57 AM »

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.
Logged
GSz
Supporting Member
**
Posts: 21


see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #3 on: October 31, 2009, 06:08:06 AM »

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
Logged

- Truly Yours
    Gal Szkolnik
Pages: [1]   Go Up
  Reply  |  New Topic  |  Print  
 
Jump to:  
   Forum Home   Thread Marks Chat! Downloads Search Login Register  

DonationCoder.com | About Us
DonationCoder.com Forum | Powered by SMF
[ Page time: 0.026s | Server load: 0.01 ]