Microsoft KB Archive/311269

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

Article ID: 311269

Article Last Modified on 5/20/2005

-

APPLIES TO


 * Microsoft Windows Scripting Host 2.5, when used with:
 * Microsoft Windows XP Professional

-



This article was previously published under Q311269





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 &quot;Applies to&quot; section.



Steps to reproduce the problem
 Click Start, point to Programs, point to Accessories, and then click Notepad.  Copy the following code, and then paste it into Notepad:  set oController = CreateObject(&quot;WSHController&quot;) set oProcess = oController.CreateScript(, ) WScript.ConnectObject oProcess, &quot;remote_&quot; oProcess.Execute While oProcess.Status <> 2 WScript.Sleep 100 WEnd WScript.Echo &quot;Done&quot;

Sub remote_Error Dim theError Set theError = oProcess.Error WScript.Echo &quot;Error - Line: &quot; & theError.Line & &quot;, Char: &quot; & theError.Character & vbCrLf & &quot;Description: &quot; & theError.Description WScript.Quit -1 End Sub

 Save the document with the file name RemoteTest.wsf .</li> On the File menu, click New to create a new file.</li>  Copy the following code, and then paste it into the new Notepad document: <script language=&quot;VBScript&quot;> set fso = CreateObject(&quot;Scripting.FileSystemObject&quot;) set fout = fso.CreateTextFile(&quot;c:\RemoteTest.txt&quot;, true) fout.WriteLine Now fout.Close </li> 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.</li></ol>

Keywords: kberrmsg kbbug kbnofix kbdswmanage2003swept KB311269

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.