I have been using the script below to map users drives for over a year with no problem. Now this morning, users are getting an error when logging on that the script failed and there drives are not mapped...can anyone offer some clues as to why this might be happening? The script works locally.
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objNetwork = CreateObject("Wscript.Network")
If (objFSO.DriveExists("H:") = True) Then
objNetwork.RemoveNetworkDrive "H:", True, True
objNetwork.MapNetworkDrive "H:", "\\server\public"
If (objFSO.DriveExists("G:") = True) Then
objNetwork.RemoveNetworkDrive "G:", True, True
objNetwork.MapNetworkDrive "G:", "\\server\apps"
The Windows Scripting error is as follows:
Error: An extended error has occured