Very tricky error. The clue is in the name after Error: in the message box.
Introduction to Code 800A01F5
Error code, 800A01F5 occurs when you execute a VBScript. This is a
runtime error, check your objects and strings.
The Symptoms you get
The script does not execute as you had hoped. Instead you get a WSH message
box like this picture:
The Cause of Error 800A01F5
Your VBScript contain is a misuse of a string or object variable.
The clue here is in the 'strComp'. What could be wrong? In the
case of this WSH error the logic is faulty, what is required is an object
property, not a str = string property.
Incidentally, Source: reports a runtime error not a compilation error, this means you are looking not for a pure syntax problem, but a fault logic error. In the case of runtime errors, you can use this
temporary work around. Add this statement just before the line which errors: On Error Resume Next.
The Solutions
Check the syntax of your script. In my VBScript example line 7 is the
problem. With WSH error messages, Char 1, is often unreliable, the
problem could be anywhere on that line.
As a last resort, in the case of runtime errors, you can add this line: On Error Resume Next.
Example of Error 800A01F5 Script
Note: The Line: 7 strComp = OurNetwork.Username.
The problem is that you cannot set a variable to be equal to this particular property (.Username). As the error messages says, this
is an illegal assignment.
' Error 800A01F5 VBScript to to Enumerate your mapped drive
' Guy Thomas February 2004.
' ******************************
Set OurNetwork = WScript.CreateObject("WScript.Network")
Set objDrives = OurNetwork.EnumNetworkDrives
' WScript.Echo OurNetwork.Username &" 's Network drive mappings:"
strComp = OurNetwork.Username
WScript.Echo strComp
WScript.Quit
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.