BUG: You receive an "ActiveX component can't create object" error message when you Use Windows Script Host to execute remote script

Article translations Article translations
Article ID: 311269 - View products that this article applies to.
This article was previously published under Q311269
Expand all | Collapse all

On This Page

SYMPTOMS

When you try to execute a remote script by using Windows Script Host (WSH) 5.6 on a Windows XP-based computer, you may receive the following error message:
Error: ActiveX component can't create object
Code: 800A01AD
Source: Microsoft VBScript Runtime Error

CAUSE

This behavior can occur if the setup for WSH remote scripting was performed incorrectly on your Windows XP-based system.

RESOLUTION

To resolve this issue, register the WScript object by running the wscript -regserver command from a command prompt or from the Run command on the Start menu.

STATUS

Microsoft has confirmed that this is a bug in the Microsoft products that are listed in the "Applies to" section.

MORE INFORMATION

Steps to reproduce the problem

  1. Click Start, point to Programs, point to Accessories, and then click Notepad.
  2. Copy the following code, and then paste it into Notepad:
    <package>
    <job>
    <script language="VBScript">
    set oController = CreateObject("WSHController")
    set oProcess = oController.CreateScript(<Path To Remote Script>, <Server>)
    WScript.ConnectObject oProcess, "remote_"
    oProcess.Execute
    While oProcess.Status <> 2
       WScript.Sleep 100
    WEnd
    WScript.Echo "Done"
    
    Sub remote_Error
    	Dim theError
    	Set theError = oProcess.Error
    	WScript.Echo "Error - Line: " & theError.Line & ", Char: " & theError.Character & vbCrLf & "Description: " & theError.Description
        	WScript.Quit -1
    End Sub
    
    </script>
    </job>
    </package>
    					
  3. Save the document with the file name RemoteTest.wsf.
  4. On the File menu, click New to create a new file.
  5. Copy the following code, and then paste it into the new Notepad document:
    <package>
    <job>
    <script language="VBScript">
    set fso = CreateObject("Scripting.FileSystemObject")
    set fout = fso.CreateTextFile("c:\RemoteTest.txt", true)
    fout.WriteLine Now
    fout.Close
    </script>
    </job>
    </package>
    					
  6. Save the document with the file name RemoteFile.wsf. When you run the RemoteTest.wsf file, the computer connects to the remote server and runs RemoteFile.wsf. Note that to connect to the remote server, you must supply both the path to the file and the server information.

Properties

Article ID: 311269 - Last Review: May 20, 2005 - Revision: 2.2
APPLIES TO
  • Microsoft Windows Scripting Host 2.5, when used with:
    • the operating system: Microsoft Windows XP
Keywords: 
kbdswmanage2003swept kbbug kberrmsg kbnofix KB311269

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com