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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Mapping Drives

Status
Not open for further replies.

redman71

IS-IT--Management
Joined
Mar 15, 2002
Messages
329
Location
US
I have users that get disconnected from their mapped drives after being idle for a while. I noticed that I'm using "net use /persistent:no" in my script.
Is that the reason?


 
you mean totally disconnected or "red x" disconnected?
 
Don't you want that persistent:yes? Glen A. Johnson
Johnson Computer Consulting
MCP W2K
glen@johnsoncomputers.us

[americanflag]

"Uniformity is death, diversity is life."
Mikhail A. Bakunin (1814-1876); Russian writer and revolutionary.
 
is that the problem?
 
red x is not truly "disconnected" in the sense that the mapping is gone. it's just an idle time disconnect that frees up smb resources. if you want to stop that behavior, from the sharing server command prompt, do :
net config server /autodisconnect:-1
 
If you want the same drives to be mapped each time, use this instead, it prevents getting errors about the local device name being in use.

Put these commands just before your usual drive mapping commands in the script:

net use <drive>: /delete
OR
net use * /delete (This will remove all mappings)

Take out the /persistent option for the usual mapping commands.(since some versions of Windows don't understand it anyways)
I prefer the first command since the users might map other drives on their own, unless you don't want that.
 
thanks...eventhough the red x doesn't truely mean they are disconnected, when they click on the drive, they get an error stating that the server could not be found.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top