Troubleshooting Code Error 8007052E Logon Failure: unknown user name or
bad password
Introduction to error Code 8007052E
This error, code 8007052E usually occurs when you try to map a network drive with a VBScript.
My suggestion is that there is a typo in the username or the password.
Error messages beginning 8007xxxx mean there is a problem with Windows rather
than VBScript itself.
The Symptoms you get 8007052E
When you execute the script you get a message box. The
VBScript does execute as you hoped.
One possibility is that the password needed by MapNetworkDrive has been misspelt or omitted.
(Please send in a screen shot of the Error message in have this problem.)
The Cause of Code 8007052E
Your VBScript contains an illegal username or password. Check the
spelling of your objects in the script. The source
WshNetwork.MapNetworkDrive, help to track down the faulty part of the script.
The Solution
Check the spelling of your username and password. In the case of runtime errors you can use a work-around.
Add this line: On Error Resume Next.
strDriveLetter = "P:"
strRemotePath = "\\calan\home"
strUser = "Administrator"
strPassword = "StLouis"
strProfile = "False" ' means do not store in profile leave as false.
objNetwork.MapNetworkDrive strDriveLetter, strRemotePath, strProfile, strUser,
strPassword
Try
a different solution, download SolarWinds ipMonitor
Here is my thinking,
ipMonitor will give you valuable data about your network and servers.
This extra information just may unlock the solution to your error code.
One more thing, sometimes when troubleshooting you go around in circles;
therefore if you try a different, but related approach, you may just crack the
problem.
Free Download
of SolarWinds ipMonitor
Their topics and material are ideal for getting you started with VBScript. The
videos are easy to follow and you can control the pace. Try their free demo material and then see if you want to buy the full package.
See more about VB Script Training CD.
The extra features you get in your eBook
include, more pages full of detailed examples. Also, ten 'how to...'
sections, with screen shots showing which menus to use. Go for Guy's
eBook - and get a printable version with copy enabled and no expiry date.