Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

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


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

↑ Back to the top


Cause

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

↑ Back to the top


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.

↑ Back to the top


Status

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

↑ Back to the top


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.

↑ Back to the top


Keywords: kbdswlhapplies, kbdswlhwrapup, kbdswlhfreshness, kbdswmanage2003swept, kbbug, kbdsupport, kberrmsg, kbnofix, kb

↑ Back to the top

Article Info
Article ID : 311269
Revision : 4
Created on : 6/10/2019
Published on : 6/10/2019
Exists online : False
Views : 1274