thanks for the idea. I'm really bad at writing scripts, can you tell me how to start and end the script
Main Topics
Browse All TopicsI'm using the following script to map drives when users login.
Option Explicit
Dim objNetwork, strRemotePath1, strRemotePath2, strRemotePath3, strRemotePath4
Dim strDriveLetter1, strDriveLetter2, strDriveLetter3, strDriveLetter4
strDriveLetter1 = "P:"
strDriveLetter2 = "R:"
strDriveLetter3 = "Y:"
strDriveLetter4 = "Z:"
strRemotePath1 = "\\tmaserver\data\users"
strRemotePath2 = "\\tmaserver\data\programs
strRemotePath3 = "\\tmaserver\data\Epic"
strRemotePath4 = "\\tmaserver\data\files"
Set objNetwork = CreateObject("WScript.Netw
' Section which maps three drives, P: and R: and Y: and Z:
objNetwork.MapNetworkDrive
objNetwork.MapNetworkDrive
objNetwork.MapNetworkDrive
objNetwork.MapNetworkDrive
Wscript.Quit
The problem is that the users don't always shutdown their computers at night and when they come back in the morning a couple of the drives show as disconnected. When the user logs back in the script says that one of the drives is already in use and won't remap. The only way to reestablish the connection to the mapped drives is to reboot the XP system and logon again.
Is there a way to keep the drives from disconnecting?
Thank you
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Well for this one, you'd just create a text file in notepad.
copy and paste the code below into it
Net use P: /D
Net use R: /D
net use Y: /D
net use Z: /D
net use P: \\tmaserver\data\users /Persistent:Yes
net use R: \\tmaserver\data\programs /Persistent:Yes
net use Y: \\tmaserver\data\Epic /Persistent:Yes
net use Z \\tmaserver\data\files /Persistent:Yes
Lastly rename the file to mapdrives.bat (make sure your system is configured to show the full extension, or else you'll end up naming it mapdrives.cmd.txt - if you've done it right, the icon should change from a notepad icon to a dos looking square.
now you need to put this in your netlogon share.
Mine is at : C:\WINDOWS\SYSVOL\sysvol\o
In mine I noticed another script that came with SBS.
since you still want that one to run, the easiest thing to do is modify it.
open SBS_LOGIN_SCRIPT.Bat with notepad (don't double click, you'll run the bat file, what you should do is right click, and edit)
add one line CALL mapdrives.bat
In my setup, all users call SBS_LOGIN_SCRIPT.BAT at logon - so at this point you are done.
However if you want to confirm what script they are running, you can go to server management-Users - then right click a user and get properties, and click the 'profile' tab - it will be listed under user profile->Logon Script
Business Accounts
Answer for Membership
by: fruhjPosted on 2006-03-08 at 15:54:48ID: 16140155
I've used a simple batch file for this for ages with good results:
Net use P: /D
Net use R: /D
net use Y: /D
net use Z: /D
net use P: \\tmaserver\data\users /Persistent:Yes
etc...
you put this in a login.bat file in the netlogon directory, then through servermanager, assign that batch file to each user (you can probably do it with group policy too if you have tons of users)