LIFEEXPERT
asked on
Script Error when mapping drives through a script.
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.Fi leSystemOb ject")
Set objNetwork = CreateObject("Wscript.Netw ork")
If (objFSO.DriveExists("H:") = True) Then
objNetwork.RemoveNetworkDr ive "H:", True, True
End If
objNetwork.MapNetworkDrive "H:", "\\server\public"
If (objFSO.DriveExists("G:") = True) Then
objNetwork.RemoveNetworkDr ive "G:", True, True
End If
objNetwork.MapNetworkDrive "G:", "\\server\apps"
The Windows Scripting error is as follows:
Script: \\Server\Netlogon\1.vbs
Line: 7
Char: 1
Error: An extended error has occured
Code: 800704B8
Source: WSHNetwork.MapNetworkDrive
Set objFSO = CreateObject("Scripting.Fi
Set objNetwork = CreateObject("Wscript.Netw
If (objFSO.DriveExists("H:") = True) Then
objNetwork.RemoveNetworkDr
End If
objNetwork.MapNetworkDrive
If (objFSO.DriveExists("G:") = True) Then
objNetwork.RemoveNetworkDr
End If
objNetwork.MapNetworkDrive
The Windows Scripting error is as follows:
Script: \\Server\Netlogon\1.vbs
Line: 7
Char: 1
Error: An extended error has occured
Code: 800704B8
Source: WSHNetwork.MapNetworkDrive
To ask the obvious: anything changed with the rights on the share?
ASKER
No - No changes at all. Has been fine for at least a year or better.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Yep - that was it. The time was off by 8 minutes! Thanks!