What am I doing wrong? I have verified the unc path is correct.
' VBScript to map a user s home drive using string variables
' Guy Thomas January 2005. Guy Thomas Page 15 of 70 LogonScripts V52
' ----------------------------------------
Dim objNetwork, strDriveLetter, strUNCpath, strUser
strDriveLetter = "K:"
strUNCpath = "\\encsd3\data\users\admin\"
Set objNetwork= CreateObject("Wscript.Network")
strUser =objNetwork.UserName
objNetwork.MapNetworkDrive strDrvieLetter, strUNCpath & struser
WScript.echo " Drive Mapped " & DriveLetter
WScript.Quit
Error: Line 9
char 1
Error: The specified network resource or device is no longer availabe
code 80070037
WSHNetwork.MapNetworkDrive
thanks
From ONScript, here is the error: WSHNetwork.MapNetworkDrive: The specified network resource or device is no longer available.
' VBScript to map a user s home drive using string variables
' Guy Thomas January 2005. Guy Thomas Page 15 of 70 LogonScripts V52
' ----------------------------------------
Dim objNetwork, strDriveLetter, strUNCpath, strUser
strDriveLetter = "K:"
strUNCpath = "\\encsd3\data\users\admin\"
Set objNetwork= CreateObject("Wscript.Network")
strUser =objNetwork.UserName
objNetwork.MapNetworkDrive strDrvieLetter, strUNCpath & struser
WScript.echo " Drive Mapped " & DriveLetter
WScript.Quit
Error: Line 9
char 1
Error: The specified network resource or device is no longer availabe
code 80070037
WSHNetwork.MapNetworkDrive
thanks
From ONScript, here is the error: WSHNetwork.MapNetworkDrive: The specified network resource or device is no longer available.