How to run remote COM stuff? ("ActiveX component can't create object")

J

james

Hi, I managed to get hold of this script some time ago. But I need to
run it and connect to a remote machine. Is there anyway of doing this? I
have looked around and a few docs mention 'registering app'. I am confused
because the CLSID already contains these COM objects on both the local and
remote clients.

Can anyone help?


sActionName="Hardware Inventory Collection Cycle"
'Change sAction to "Software Inventory Collection Cycle" for software
inventory.
'Create a CPAppletMgr instance.
Dim oCPAppletMgr
Set oCPAppletMgr = CreateObject("CPApplet.CPAppletMgr")
'Get the available ClientActions object.
Dim oClientActions
Set oClientActions = oCPAppletMgr.GetClientActions()
'Loop through the available client actions.
Dim oClientAction
For Each oClientAction In oClientActions
'Is this the action we want to start?
If oClientAction.Name = sActionName Then
'Start the action.
oClientAction.PerformAction
End If
Next

Thanks
James
 
M

Michael Harris \(MVP\)

james said:
Hi, I managed to get hold of this script some time ago. But I
need to run it and connect to a remote machine. Is there anyway of
doing this? I have looked around and a few docs mention 'registering
app'. I am confused because the CLSID already contains these COM
objects on both the local and remote clients.

Can anyone help?


Set oCPAppletMgr = CreateObject("CPApplet.CPAppletMgr", "remotemachinename")
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top