I'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
ork")
' Section which maps three drives, P: and R: and Y: and Z:
objNetwork.MapNetworkDrive
strDriveLetter1, strRemotePath1
objNetwork.MapNetworkDrive
strDriveLetter2, strRemotePath2
objNetwork.MapNetworkDrive
strDriveLetter3, strRemotePath3
objNetwork.MapNetworkDrive
strDriveLetter4, strRemotePath4
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
Start Free Trial