cancel
Showing results for 
Search instead for 
Did you mean: 

Accessing network drives at startup

RobDickson
Grafter
Posts: 632
Thanks: 2
Registered: 06-08-2007

Accessing network drives at startup

I have assigned drive letters to the network drives on my server, and selected "Reconnect at logon", so that the drive letters are assigned whenever I start up my PC. My problem is that although the drive letters are assigned correctly every time I boot up, the drives aren't actually available. When I open up My Computer, the drives are correctly listed under "Network Drives", but they are shown as "Disconnected Network Drives". All I need to do is to double-click on the drive letter, and Windows connects to the drive without any problems.

It's annoying to have to do this every time I reboot my PC. I am sure there must be a way around this, but I've tried searching the web, and I can't find one.

I used to have a problem with WinXP automatically disconnecting from network drives, but I found an easy solution to this.

I'm running WinXP-Home-SP2 and NIS2006 in case that makes a difference.
12 REPLIES
N/A

Accessing network drives at startup

You say connected to the server are you logging into a server ie domain or just connecting? If you are logging on then create the shares in a login script.

To get the drives you have a couple of options.

Create a script that runs in the startup fold to map the drives ie

net use p: \\server\sharename

save it as a conect.cmd and put it in the startup folder

Or you may get away with running something which connect to the drives like a cmd file that simply does a dir of the drive or create a batch file on the drive and run that it could simply be
echo drive mapped.

and save as map.bat and again put it in startup
RobDickson
Grafter
Posts: 632
Thanks: 2
Registered: 06-08-2007

Accessing network drives at startup

Thanks for your reply. I'm simply connecting, not logging in.

.cmd and .bat files takes me back several years. I think I understand your replies.

Creating a .bat file that executes a dir command should hopefully do the job, but I think I'll leave it until I've got a clear head sometime tomorrow. It should be simple.....
RobDickson
Grafter
Posts: 632
Thanks: 2
Registered: 06-08-2007

Accessing network drives at startup

Thanks again for your suggestion.

Rather than messing around with .CMD and .BAT files (which is, of course, the best solution), I have simply placed a shortcut to the Y: drive in my Startup folder. This has the disadvantage of having a copy of Windows Explorer open, but at least the Y: drive is connected.

The main reason that I want the Y: drive to connect is that during the day, my PC backs up to the server. If it's not connect to the server, then the backup fails. Having to close a Windows Explorer window is better than the backup failing.

I'll try to figure out the .CMD and .BAT files another time, since my memory of DOS commands is a little rusty.

Rob
Community Veteran
Posts: 14,469
Registered: 30-07-2007

Accessing network drives at startup

Just create a connect.bat file in notepad with the following command in it:


DIR Y:


Then add connect.bat to your start-up folder. When you system starts up, it will open a dos window, do a dir of drive Y and then close it again.

[Moderator's note by Jonathan (chilllypenguin): Code tag fixed.]
RobDickson
Grafter
Posts: 632
Thanks: 2
Registered: 06-08-2007

Accessing network drives at startup

Thanks for you replies. It really was easy, I don't know why I was so worried I wouldn't remember!

Unfortunately, neither option works.

dir y: fails, because y: is not available. It only works once I've connected the drive by double-clicking in My Computer.

net use p: \\server\sharename fails. It gives:

System Error 53 has occured.
The network path was not found.

All I can think is that "sharename" is "DISK 1", and the space is causing problems in DOS.

Anyway, I'm back to running a shortcut to Y: in Windows.

Thanks again for your suggestions.
Community Veteran
Posts: 1,236
Registered: 02-08-2007

Accessing network drives at startup

Are you connected to a wireless network?
I have drives in my server mapped both on my dasktop machine which is hard wired and on my laptop which is wireless. My desktop machine reconnects no problem but the laptop always gives me the could not reconnect mapped networked drives message. Same as you when I go into my computer I am able to access them so it has never been a problem. I just put this down to windows trying to connect the drives before the wireless network has a chance to connect.
RobDickson
Grafter
Posts: 632
Thanks: 2
Registered: 06-08-2007

Accessing network drives at startup

The network that I'm talking about is a wireless network, but I find the same on wired PCs as well.

I'd always accepted that it's just what Windows does, I just decided to try to do something about it yesterday.
N/A

Accessing network drives at startup

You could get around the problem by downloading wait.exe from
http://www.afreego.com/Categories/Utilities/Automation/006450.php

Its a very small file and all it does is let you wait x number of seconds so you could create a file called back.cmd and put in it

wait 40
dir y:

The other way to do it is to put wait in the backup depending how you are doing it. If its a exe file you could again create back.cmd and put in it

wait 40
backup.exe

and put it in your startup this would make it wait for 40 seconds before the backup runs thus giving it time for the network to work. If you want to be clever you can get winpatrol from

http://www.winpatrol.com/

not only doe sit stop any changes to your system thuse stopping virus spyware etc it also lets you delay startup progs via the registry
RobDickson
Grafter
Posts: 632
Thanks: 2
Registered: 06-08-2007

Accessing network drives at startup

Unfortunately, delaying running dir y:, or delaying running the backup, won't help in this case. Even if I wait until the PC has completely booted up, the Y: drive is not accessible, and running dir y: from the DOS prompt doesn't work. Once I've double-clicked on the Y: drive in My Computer, then running dir y: from the DOS prompt does work.

The backup that I'm doing is using WinZIP, and is timed to run later on in the day anyway.

Thanks for all your suggestions. I think that your suggestions for delaying programs running on start-up, although I don't think they'll work in this case, will definitely be useful in other cases.

Thanks again.

Rob
pjemmanuel
Grafter
Posts: 349
Registered: 05-04-2007

Accessing network drives at startup

Quote
net use p: \\server\sharename fails. It gives:

System Error 53 has occured.
The network path was not found.

All I can think is that "sharename" is "DISK 1", and the space is causing problems in DOS.


If the net use is failing because of the space in the share name, try wrapping the whole path up in quotes...
net use y: "\\server\DISK 1"
N/A

Accessing network drives at startup

If you really want it to work then create a map.cmd file and put in it

net use p: /delete
net use l: /delete
net use p: \\servername\sharename password /user:username
net use l: \\servername\sharename password /user:username


The username is the username of the account on the server by running this at startup will make the map drives live every time.
Change p: and L: to the drive letters you want

if you are using wireless then you may need to delay it while the wireless connection comes up.

Part of your problem is when you connect the mapped drive the username and password wont be sent until your profile is fully loaded hence the delay or if its radio it will take some time to come up
RobDickson
Grafter
Posts: 632
Thanks: 2
Registered: 06-08-2007

Accessing network drives at startup

Thanks for the advice. I'll give it a go tomorrow night.