Link to home
Start Free TrialLog in
Avatar of Jeff_Burns
Jeff_Burns

asked on

Mapped drive not re-connecting at logon

I've got a small office with four PC's, a switch, and no Internet. It is peer-to-peer, but with PC4 acting as a server. Our main program is mapped as a network drive to all the PC's. Recently, PC1 is having trouble re-connecting at logon. Once you double-click the 'Z' drive it reads it just fine, but stays disconnected until the double-click. (And yes...the 'Reconnect at Logon' button is checked!) PC's 2 and 3 have the same configuration and are not having any problems. The switch was replaced as well...same problem. Any other ideas?
Avatar of Irwin Santos
Irwin Santos
Flag of United States of America image

NET USE Z: \\machinename\sharename /PERSISTENT:yes
use that in your login script
Avatar of Jeff_Burns
Jeff_Burns

ASKER

OK, sorry for the bonehead question, but where is that script located?
It's the netlogon share : %systemroot%\sysvol\sysvol\<domainname>\scripts. You have to assign the users a script via 'Active Directory Users and Computers'.
Avatar of giltjr
What problem is being caused by the drive being disconnected?

How do you know that it is disconnected?

I am assuming that you are seeing this using the net use command and that you see the mapped drive but it is listed as disconnected.

I think that you may be getting connected/disconnect mixed up with mapped and not mapped.  It is normal for a mapped drive to get disconnected.  Windows does this to save resources, as soon as the mapped drive is needed the connection is re-established and as long as you can get to the server all is well.  

The /PERSISTENT:yes means that Windows will attempt to MAP the drive everytime you logon, it does not mean that it will keep the drive connected all of the time.
Hi irwin, "small office with four PC's, a switch" guessing no Domain controller.

I doubt there is  anything wrong with your network. It is possible to have a network that connects too fast, such that a race condition can exist between the physical connection and the mappings or the applying of policies. MS has an old work-a-round for this which is to use the persistent:no option (not normal practice). Apparently this forces a slowdown on boot up allowing the drives to connect. However, that will only work if you are using logon scripts which I guess you are not. There is a group policy object that is used on domains to correct this, that you might try on the local machines. (one at least as a test). Open group policy on the local machine by entering GPEdit.msc in the start | run box (this would be on one of the machines thatis loosing the drive mappings).
 Then browse to:
Computer configuration | administrative templates | System | Logon | always wait for the network
Right click on that policy, choose properties and enable.
See if it makes a difference.
Thanks for the input everyone. I will try your suggestions in the morning. Regarding the question by giltjr, the mapped drive appears in 'My Computer' and shows as 'disconnected'. Windows also pops up at logon 'Unable to connect to network drives'.
@Robwill...whoops... I missed peer-peer.
>>"missed peer-peer"
So did I. I had a response all typed out when I refreshed and caught on.  :-)
Face it -- the NET USE is a crutch for a problem in the windows setup.  When it is done correctly, NET USE is useless and not wanted.  So as others tell me when I suggest lmhosts -- "FIX the problem first, do not create a bypass around it."

Jeff -- to fix this probelm, remove ALL networking protocols from system 1, and then remove the adapter from device mangler.  Then reboot immdiately.  Decive manger will redetect the NW card and ask you to reinstall the network -- YES MS, we DO want to do this, so go through the steps and install all the protocols you want.  Then at this point shut down the server and system1, and reboot the server, 5 minutes later, rebooot system 1, and remake the share.  It is fixed?
Hi Jeff,
instead of trying to solve the operating system issue, (guys, we're talking about four PCs in a peers lan), you may use something like a batch file on PC4, for example

FILE \\PC4\share\launch.cmd
net use [X]: \\PC4\[share]             <- change [share] and [X] with your shared folder
                                                        and mapped drive letter
"C:\Program Files\XXX\XXX.exe"    <- your application path here


Then create a shortcut on the desktop of others pc linking \\PC4\share\launch.cmd and that's all...
Notice that if you have multiple users you can pur the shortcut directly in C:\Documents and settings\All Users\Desktop and all of your users will be set up on any client PC, while you will have to map the drive for each user on each client (and hope that any of them will disconnect it)
I really do know that this is an empirical solution, but on a very simple network like yours, it may be ok.
Hope this helps.
Bye
theric
@scrathcyboy
"the NET USE is a crutch for a problem in the windows setup" ???
Curious as to what that means.
Create a .bat file from the Dos editor including the command that irwinpks says and locate it in the startup folder and it will be fine. Nothing else is needed.
From what you are describing the drives are mapping and active under the My Computer / My Networks but when look at them they simply say disconnected .. Am i correct.

Basically you have "wake" them up to have them readily accessible.

This is explained in http://support.microsoft.com/default.aspx?scid=kb;en-us;297684

CAUSE
This behavior occurs because Windows NT Server 4.0, Windows 2000 Server, and Windows Server 2003 can drop idle connections after a specified time-out period (by default, 15 minutes) to prevent wasting server resources on unused sessions. The connection can be re-established very quickly, if required.


Remedy


Registry Editor
NOTE: You cannot use this method to turn off the autodisconnect feature of the Server service. You can only use this method to change the default time-out period for the autodisconnect feature. WARNING: If you use Registry Editor incorrectly, you may cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that you can solve problems that result from using Registry Editor incorrectly. Use Registry Editor at your own risk.

Use Registry Editor to increase the default time-out period. To do this, follow these steps, and then quit Registry Editor: 1. Click Start, click Run, type regedit (Windows 2000 or Windows Server 2003) or type regedt32 (Windows NT 4.0), and then click OK.  
2. Locate and then click the following key in the registry:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lanmanserver\parameters
3. In the right pane, click the autodisconnect value, and then on the Edit menu, click Modify. If the autodisconnect value does not exist, follow these steps: a.  On the Edit menu, point to New, and then click REG_DWORD.
b.  Type autodisconnect, and then press ENTER.  
 
4. Click Hexadecimal.
5. In the Value data box, type ffffffff, and then click OK.  


Command Line

NOTE: If you use this method, you may turn off the autotuning feature for the Server service.

To change the default time-out period for the autodisconnect feature of the Server service, open a command prompt, type the following line, and then press ENTER
net config server /autodisconnect:number
where number is the number of minutes that you want the server to wait before it disconnects a mapped network drive. The maximum value for this command is 65,535.

NOTE: If you set the autodisconnect value to 0 (zero), the autodisconnect feature is not turned off, and the Server service disconnects mapped network drives after only a few seconds of idle time.

To turn off the autodisconnect feature, open a command prompt, type the following line, and then press ENTER:
net config server /autodisconnect:-1
Awesome. I appreciate the input. I was not able to get to that office this morning so I will have to wait until Tuesday. Since I have so many options, I feel confident I can get this resolved. Thanks again!
Jeff
Enjoy the weekend Jeff. Let us know how you make out.
--Rob
Glad to be of assistance.
Well, Nothing worked.

Prue, this system is running XP Pro and is not part of a client-server network.

Basically, the network is running and the mapped drive in question IS accessible as soon as you click on it. However, it's an irritant to the customer and I need to make sure this isn't indicative of a potentially larger problem.

Any other ideas or input? I appreciate it...

Jeff
The registry key had no impact ?

I tried it here on XP and set it to the max size and didnt notice any diconnects.
I'm sorry Prue, I looked at the OS mentioned and assumed that it would not apply to this set-up. I'll give it a shot.
prueconsulting's tip is a common solution for drives that disconnect after a while (the auto disconnect time period) but I don't believe it will resolve the disconnected on boot problem.
What you may want to do is install a packet sniffing program on the "server" and see what network traffic it is seeing.  I use Ethereal as it is easy and free (http://www.ethereal.com)

Start up Ethereal.
Boot the PC.
Logon to the PC.
Stop Ethereal.

If you see nothing from the PC then there is the possibility that the OS is attempting to re-connect to the share before the network connection is up.  How is the PC connected to the LAN?  Wired or Wireless?  If Wired, HUB or Switch?  If Swtich, what brand and model.
ASKER CERTIFIED SOLUTION
Avatar of moreniebla
moreniebla

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Is there any chance that the PC's to which you are connecting have power management features enabled for the network adapter. If so the NIC's could be "asleep" when the connecting computer boots up and they would be unavailable. To check, on the computer with the share go to:
device manager | expand network adapters | right click and choose properties fro the appropriate adapter | power management | un-check "allow the computer to turn off this device to save power"
Thanks for the new tips everyone. I'll give those a go on Monday morning.

RobWill, I already tried that...no luck, but thanks.

Jeff_Burns
Dind it WORK?
No news yet. The customer in question has been out of the office for a week. I'll be at it again by Tuesday.
The Network Drive Manager did the trick! Thanks for all your help! Sorry for the delay!

Jeff