rminnich
12 years agoContributor
WMI help
I am trying to follow the example for using the WMI plug in included in TestComplete 8.5. I am having no success using the plug in.
I have peiced togather this subrouting from the Testcomplete help. At this point I am trying to populate a collection with valid values.
sub t
Dim i
WMI.ComputerName="."
Dim OSColl, OSItem
Set OSColl = WMI.Service.ExecQuery("SELECT * FROM Win32_OperatingSystem")
i=0
For Each OSItem In OSColl
i=i+1
Next
end sub
When I place a break point on the for each loop and then step to the next statement,
I get an error stating that the object is not a collection. I have run this both as my normal user and as administrator.
My end goal is to retrieve the suitemask using the WMI plugin. I am trying to avoid using powershell (that requires an additional software package to be installed for each setup) and using a custom .Net function via the CLR bridge (I already do that once and I know it works. I would like to replace it in the future if I could get the WMI plug in to work).
I have peiced togather this subrouting from the Testcomplete help. At this point I am trying to populate a collection with valid values.
sub t
Dim i
WMI.ComputerName="."
Dim OSColl, OSItem
Set OSColl = WMI.Service.ExecQuery("SELECT * FROM Win32_OperatingSystem")
i=0
For Each OSItem In OSColl
i=i+1
Next
end sub
When I place a break point on the for each loop and then step to the next statement,
I get an error stating that the object is not a collection. I have run this both as my normal user and as administrator.
My end goal is to retrieve the suitemask using the WMI plugin. I am trying to avoid using powershell (that requires an additional software package to be installed for each setup) and using a custom .Net function via the CLR bridge (I already do that once and I know it works. I would like to replace it in the future if I could get the WMI plug in to work).
Hi @ShaiyanAli!
Thanks for the great question! Unfortunately this is not supported within TestComplete, but this would make a great feature request.
You may use this link to submit any feature requests you have for TestComplete;