#300 closed enhancement (fixed)
requst CheckWMI allow selection of namespaces and handle booleans
|Reported by:||john_klein@…||Owned by:||mickem|
This may be stupid user error, but I'd like to check the MS Security Center to see if it thinks an Antivirus product is installed and up to date.
I need to issue the query
SELECT productUptoDate FROM antivirusProduct
in the "\root\SecurityCenter?" namespace.
The return is a boolean, which I'm not sure how to handle with CheckWMI, and I'm also unclear if it's possible to set the namespace.
THANK YOU for your work on NSC++!
Here's a snippit of VB that I've been using on the servers to explore the WMI returns:
rem from http://www.experts-exchange.com/Programming/Languages/Scripting/Shell/Q_23085869.html
Const wbemFlagReturnImmediately = &h10
Const wbemFlagForwardOnly = &h20
strComputer = "."
Set colItems = objWMIService.ExecQuery?("SELECT * FROM antivirusProduct", "WQL", _
wbemFlagReturnImmediately + wbemFlagForwardOnly)
For Each objItem In colItems
"productUptoDate: " & objItem.productUptoDate & VbCrLf? & _