Discussion Locked

Can't lose network mapped drives.

0 helpful
11 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
I know there is a way to keep a RAS connection when you log off and log on, but is there a way to keep a drive mapped, or at least keep a network connection to a shared folder?

11 replies

by syscokid

To keep a drive mapped, use the /persistent switch at the end of the net use statement.

by mnman

This is good only when you are logged in as a user or just logging in. I need the drive to stay mapped all of the time, regardless if I'm logged in or not.

by oliviu

I suppose you're talking about the same user login.

If you map from the Windows Explorer simply check the 'Reconnect at logon' box.

by mnman

This is good only when you are logged in as a user or just logging in. I need the drive to stay mapped all of the time, regardless if I'm logged in or not.

by saihib

net config server /autodisconnect:-1

Run this command from a command prompt on your server. By default win2K disconnects idle drive mappings after 15 minutes. The above command disables autodisconnect. Well actually it doesn't turn it off it justsets the autodisconnect to disconnect after approximately 8000 years but obviously has never been tested. This can however turn off autotuning. The best way to turn it off is in the registry:

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanmanServer\Parameters

by saihib

You'll need to put a colon between autodisconnect and minus one. Sorry about that.

by mnman

This is good only when you are logged in as a user or just logging in. I need the drive to stay mapped all of the time, regardless if I'm logged in or not.

by oliviu

So, you want to run a scheduled job and to access files on the network without beeing login.

In this case do not use mapping to specify the path to the file.

If you have a computer named 'star' and you need to access a file on c:\dir1 then:
1. share the directory
2. specify the path as \\star\dir1\... and not as a mapped drive.

If you still get an error just check the permissions on the shared directory.

by mnman

We're currently working with our programmers to include this. We had thought about using this previously, but didn't want to involve our developement staff. However, since we can't retain a mapped drive when you log out of a session, this would be one of the only solutions. The other we were looking at involved using the netuse command in a batch file, and running that as a service. Haven't gotten that to run yet, but will keep everyone posted.
Thanks,

This discussion is closed to new replies.