Discussion Locked

WSH Remote Object Error

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Hello,

I am trying to run a VBScript remotely using the WshRemote object. Turns out the script bombs out when I try to access the CreateObject method. The error I get is

Error: ActiveX component can't create object
Code: 800A01AD
Source: M1crosoft VBScript runtime error

Here is the code I got from MSDN website

Dim Controller, RemoteScript
Set Controller = WScript.CreateObject("WSHController")
Set RemoteScript = Controller.CreateScript("hello.vbs", "remmachine")

Can anyone help me? Thanks.

5 replies

by nikki96

I assume you replaced "remmachine" with an actual machine address?
And that you have permissions on said remote machine to create scripts?

by rrv

i understand the createobject failed. check if you have wshom.ocx file in your system folder. it should be 88kb. after a period of time suddenly this becomes 105kb and in that case this error comes. so u need to unregister it and replace with the new one restart PC and register it again. Use any script debugging tool to find it for yourself.

RV

This discussion is closed to new replies.