Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations dencom on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MapNetworkDrive Error Codes

Status
Not open for further replies.

bwgreen

Programmer
Mar 23, 2006
68
CA
Does anyone have a list of the potential error codes that the WScript.Network.MapNetworkDrive method can return? I am trying to enhance our login scripts and want to put in some error checking (specifically for password errors).

Thanks,

Brian
 
I can't give you the answear to that... I'm sure a table exists, however... You can try to twist the question a bit. Do you need to know it everything that can possibly go wrong? or Do you need to know what went wrong?

If the answear is No/Yes, you can use the err object to find out what went wrong. Here's an example

Code:
If err.number <> 0 Then
 wscript.echo "Error number : " & err.number & " . Description : " & err.description
End If
 
What I was looking for is to trap when an incorrect password is entered - I think I got a way using the err.number <> 0 and "cannot be found." is NOT in err.description. But I'm still looking for something!

Thanks,

Brian
 
If you enter a wrong password during a network connect session, you will raise an error wich is <> 0. I would not reccomend using another query due to the fact that you will not catch other errors.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top