Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Mapping a network drive and staying connected

Status
Not open for further replies.
Jul 16, 2004
153
Hello all,
I have a few servers here and I have a few mapped drives. One reason is so I can run some scripts and pull info onto one of my boxes before I backup to tape. Now I can create the drive, but the problem is that I keep on loosing connectivity and the scripts will not run. Now when I create an scheduled task, I put in a user name and password, but after a while the connection is lost. Anyways, is there a sure fire way to create a mapped drive with out it loosing the connection?

I thought about creating a User called backup or something that every machine would have and just use this account, but will this work if the machine already has someone logged in and the machine is locked and not just logged off? Also will it keep the connection active at all times?

Thanks

Sorry for the newbe question.

Mel
 
One reason is so I can run some scripts and pull info onto one of my boxes before I backup to tape."


Put a network drive disconnect/reconnect in your script:

if using a bat script, do this:

Net use x: /delete
Net use X: \\servername\share

If this is in your script, the drive will disconnect and reconnect...





Joseph L. Poandl
MCSE 2003

If your company is in need of experts to examine technical problems/solutions, please contact (Sales@njcomputernetworks.com)
 
Thats an Idea.....Although what about logging on with the user name and password?

Thansk
Mel
 
Suggest you look at the network cards to see if they disconnect after an idle period. This can be accessed by looking at the properties of the active network card properties and looking at power management.

Another possible is the autodisconnect default setting which is set to 15 minutes. Use regedit and search for autodisconnect. This is at HKLM\System\Current ControlSet\Services\LanmanServer\Parameters\Autodisconnect

Modify this by filling the hex value with ffffffff
 
net use x: /delete
net use x: \\servername\share /user:domain\user1 enterpasswordhere



Joseph L. Poandl
MCSE 2003

If your company is in need of experts to examine technical problems/solutions, please contact (Sales@njcomputernetworks.com)
 
maybe you can also use this information about the autodisconnect functionality...



--------------------------------------
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs,
and the Universe trying to produce bigger and better idiots.
So far, the Universe is winning.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top