Code 800A0046 is a straightforward error to solve. The secret is to read the Windows Script Error message carefully, then check the access control list to see who has permission to use the page, or use
the device.
Introduction to error Code 800A0046
Code 800A0046 is runtime error that is more likely to occur with an .ASP file than a .VBS.
You could be trying to connect to SQL, IIS or Exchange. However, my
example of is taken from printer permission problem sent in by Keith S.
The Symptoms you get 800A0046
When you get a pop-up message box. Put on your detective hat, and pay close attention to the line number. Error 800A0046 is a runtime error, so the problem is likely to outside your script,
there could be something the matter with permissions on an application server.
The Cause of Error 800A0046
In the example above, Line 6: is the source of the error. Char 1: is
not always very useful as the error could be anywhere on the line, and WSH still blames char 1.
The cause of error 800A0046 is likely to be read-only permissions on some
aspect of your server. The Source: tells us that this is a runtime error, therefore the syntax is probably o.k.
The Solution
If its Exchange, then check the MailRoot and Pickup folder permissions. If its IIS check the permissions to run scripts. If its SQL check the execute permissions on the services.
The solution in the printer problem below would be to change the share
permissions on the HP6L printer share.
Example 1: Script to map a printer
In this example, the user does not have permission to install the HP6L
printer. Tell the truth, an example script is not that useful with Error 800A0046 as you cannot see the permissions!
' VBScript to create a local printer mapped to a network server
' Guy Thomas February 2004.
Option Explicit
Dim netPrinter
Set netPrinter = CreateObject("WScript.Network")
netPrinter.AddWindowsPrinterConnection "\\ServerPrn\HP6L"
Example 2: Error 800A0046 When You Install Visual Studio 6.0 (Also other Microsoft Products)
When you install Visual Studio you get the following message.
Permission denied: 'CreateObject'
/Retail/include/global_siteconfig_lib.asp,
line 194
Once again it's a permissions problem on the Windows\system32 folder.
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.