Opened 4 years ago
Closed 15 months ago
#300 closed enhancement (fixed)
requst CheckWMI allow selection of namespaces and handle booleans
| Reported by: | john_klein@… | Owned by: | mickem |
|---|---|---|---|
| Priority: | 1 | Milestone: | 0.4.0 |
| Component: | CheckWMI | Version: | 0.3.4 |
| Severity: | Bugs | Keywords: | |
| Cc: |
Description
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 objWMIService = GetObject?("winmgmts:
" & strComputer & "\root\SecurityCenter?")
Set colItems = objWMIService.ExecQuery?("SELECT * FROM antivirusProduct", "WQL", _
wbemFlagReturnImmediately + wbemFlagForwardOnly)
For Each objItem In colItems
WScript.Echo "InstanceGuid?: " & objItem.InstanceGuid? & VbCrLf? & _
"DisplayName?: " & objItem.DisplayName? & VbCrLf? & _
"OnAccessScanningEnabled?: " & objItem.OnAccessScanningEnabled? & VbCrLf? & _
"productUptoDate: " & objItem.productUptoDate & VbCrLf? & _
"VersionNumber?: " & objItem.VersionNumber?
Next
Change History (2)
comment:1 Changed 15 months ago by mickem
- Component changed from Core to CheckWMI
- Owner changed from MickeM to mickem
comment:2 Changed 15 months ago by mickem
- Resolution set to fixed
- Status changed from new to closed









Works with 0.4.0