Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

SWbemPropertySet error creating properties for object

3 views
Skip to first unread message

wellsnet

unread,
Feb 5, 2009, 3:07:02 AM2/5/09
to
Hi - I'm very new at scripting for WMI (hope this is the right forum!). I'm
creating a new class to store object instances in WMI for specific events.

I have the following lines to populate the object I just created with the
.Propeties method:

Set oServices = oLocator.ConnectServer(,"root\CIMV2")
Set objClass = oServices.Get()
objClass.Path_.Class = "xx_myEventMonitor"
objClass.Put_

Set oServices = oLocator.ConnectServer(, "root\cimv2")
Set oDataObject=oServices.Get()
oDataObject.Path_.Class="xx_myEventMonitor"
oDataObject.Properties_.add "LogFile", wbemCimtypeString <-----
oDataObject.Properties_.add "RecordNumber", wbemCimtypeString

and my script debugger gives me "SWbemPropertySet: Invalid parameter " at
the "LogFile" entry. I'm not seeing where my error is - did I not not
properly define the xx_myEventMonitor class?

Like I said, I'm really new at this - any light you can shed is much
appreciated!


0 new messages