我是一名使用 VS2010
的 C++
程序员。目前我正在使用 WMI
来监控系统中的进程和设备。在编写 WQL
查询时,是否可以从多个类中选择 TargetInstance
?
例如,不是 select * from __InstanceOperationEvent within 1 where TargetInstance ISA 'Win32_PnPEntity'
,而是如何使用 select * from __InstanceOperationEvent within .1 where TargetInstance ISA 'Win32_PnpEntity','Win32_DiskDrive '
.
我尝试使用 ,
, OR
等,但都失败了。
感谢您的帮助。
最佳答案
没什么大不了的!!!
select * from __InstanceOperationEvent within 1 where (TargetInstance ISA Win32_PnPEntity') OR (TargetInstance ISA 'Win32_CDROMDRIVE')
解决了我的问题。
关于c++ - 从多个类中选择 WMI TargetInstance?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28984562/