
April 26th, 2004, 04:34 PM
|
|
Contributing User
|
|
Join Date: Apr 2003
Posts: 78
Time spent in forums: 3 m 42 sec
Reputation Power: 6
|
|
|
help with WMI class and VBscript
I'm working with VBScript and WMI Win32 classes. The Win32_USBControllerDevice.Dependent property returns a reference to a CIM_LogicalDevice object. However, I am not able to (maybe because I dont know how) invoke any CIM_LogicalDevice property or method using that reference. I thought the "dot" notation would work but it gave me an error. Here is the code: (I'm trying to call the "Name" property of CIM_LogicalDevice class)
Set USB_Devices = WMI_Services.ExecQuery("Select * from Win32_USBControllerDevice")
For each USB_Device in USB_Devices
WScript.Echo "USB Device: " & USB_Device.Dependent.Name
Next
The error I got is:
"ERROR: Object required: 'USB_Device.Dependent'
CODE: 800A01A8"
Can someone please help?
|