Solved

Maintain connection to mapped drive with vb program on client

Posted on 2008-06-23
8
387 Views
Last Modified: 2010-04-21
If this mapped drive is not accessed in 15 minutes it loses it's connection so when opening files on this drive there is a delay while it reconnects.  I wrote vb code to go write to a text file on the mapped drive hoping that would maintain the connection.  However, that doesn't seem to work.  Any suggestions?  I don't want to change the registry, I'm looking for something i can run on the client.
0
Comment
Question by:green_thumb_98
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
8 Comments
 
LVL 23

Expert Comment

by:Christopher Kile
ID: 21848149
Have you tried opening a file then leaving it open until you have finished the processing you need to do?
0
 

Author Comment

by:green_thumb_98
ID: 21848204
Could you elaborate?
0
 
LVL 23

Expert Comment

by:Christopher Kile
ID: 21848939
It's difficult to elaborate when I don't understand exactly what you're doing, but I'll try.


With inline code:

Open text file
do whatever else you want to do
close text file

When you're running something else

build a small VB program that opens a text file in the Form_Load event, then close the file in the Form_Unload event.  Open this program before running anything else, close it when you're done.
0
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 
LVL 23

Expert Comment

by:Christopher Kile
ID: 22262340
green_thumb_98,

You never responded with feedback of any sort to my last message.  Were you able to resolve this problem, and if so, how?
0
 

Author Comment

by:green_thumb_98
ID: 22278425
I've kind of put this issue on the back burner.  However, I'm not sure I was completly clear about my problem.  I need something that will run every 15-20 minutes that will keep the shared drive connection while it is not being used.  I have tried writing to a text file and that doesn't seem to work.
0
 
LVL 23

Accepted Solution

by:
Christopher Kile earned 500 total points
ID: 22280196
>If this mapped drive is not accessed in 15 minutes it loses it's connection so when opening files on this drive
>there is a delay while it reconnects.  I wrote vb code to go write to a text file on the mapped drive hoping that
>would maintain the connection.  However, that doesn't seem to work.  Any suggestions?  I don't want to change
>the registry, I'm looking for something i can run on the client.

http://support.microsoft.com/kb/138365/EN-US/
http://support.microsoft.com/kb/297684

These two links document the LAN Autodisconnect feature.  The default disconnect time is 15 minutes, so you should be running your "shoe in the door" every 5-10 minutes.  But with the info you've given me, I can't really tell what tests you've run.  Have you tried writing text every 10 minutes? 5 minutes? 30 seconds?  When did autodisconnect kick in?  At some frequency of write-to-file, you will stay connected;  at worst, if you maintain an open file constantly, you will constantly have the connection.

If you have specific test data that contradict this (you ran the write-to-file and it timed out in X minutes which was less than the default 15 minutes and is less than the time your network administrator set for LAN Autodisconnect (if the admin set it, that is) on the server containing the mapped share), then I withdraw my objection and refer you to MS Technical Support; otherwise, I respectfully request you assign me a grade or ask the moderator to leave this question open.
0
 

Author Closing Comment

by:green_thumb_98
ID: 31469812
Thank you for yor effort.  Here's how I tested my program.  I accessed my share drive, closed it, and waited 7 minutes.  I then ran my program that writes to the text file.  I then waited another 10 minutes.  I then tried to open the share drive again and I still had the delay.  I checked the text file on the drive and it had been written to.  Oh well...  Thanks again for your help.  At the moment this is really low on my list of priorities anyway.  Thanks.
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
What do responsible coders do? They don't take detrimental shortcuts. They do take reasonable security precautions, create important automation, implement sufficient logging, fix things they break, and care about users.
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…
Progress

617 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