Function GetW7AVinfo(optional $machine)
dim $oSWbem,$colItems,$av[4],$colItem
if not $machine $machine = "." endif
$Product = "AntiVirusProduct", "AntiSpywareProduct", "FirewallProduct"
$oSWbem = GetObject("winmgmts:\\" + $machine + "\root\SecurityCenter2")
If @Error exit @error EndIf
For each $SelectStatement in $Product
$colItems = $oSWbem.ExecQuery("Select * From " + $SelectStatement)
If @Error exit @error EndIf
For Each $colItem In $colItems
$av[0] = $colItem.productState
$av[1] = $colItem.displayName
$av[2] = $colItem.instanceGuid
$av[3] = $colItem.pathToSignedProductExe
$av[4] = $colItem.pathToSignedReportingExe
Next
? $av[1]
? $av[2]
? $av[3]
? $av[4]
? $av[0]
; Select $iProductState = Hex($colItem.productState, 8)
; Case ($iProductState, 5, 2) = "00" or "01"
; $aReturn[5] = "Disabled"
; Case "10", "11"
; $aReturn[5] = "Enabled"
; EndSelect
if $av[0] = 0 ? "Something not installed"
else
endif
EndFunction
Exit