Untitled


SUBMITTED BY: Guest

DATE: May 30, 2015, 3:47 p.m.

FORMAT: Text only

SIZE: 940 Bytes

HITS: 870

  1. #include <Array.au3>
  2. Func _GetAVInfo()
  3. Dim $lArray[4]
  4. $oWMI = ObjGet("winmgmts:\\localhost\root\SecurityCenter2")
  5. $colItems = $oWMI.ExecQuery("Select * from AntiVirusProduct")
  6. For $objAntiVirusProduct In $colItems
  7. $lArray[0] = $objAntiVirusProduct.displayName
  8. $lArray[1] = $objAntiVirusProduct.productstate
  9. $lArray[2] = $objAntiVirusProduct.pathToSignedProductExe
  10. $lArray[3] = $objAntiVirusProduct.pathToSignedReportingExe
  11. Next
  12. Dim $AvStatus = Hex($lArray[1])
  13. If StringMid($AvStatus, 5, 2) = "10" Or StringMid($AvStatus, 5, 2) = "11" Then
  14. $lArray[1] = "Enabled"
  15. ElseIf StringMid($AvStatus, 5, 2) = "00" Or StringMid($AvStatus, 5, 2) = "01" Then
  16. $lArray[1] = "Disabled"
  17. EndIf
  18. Return $lArray
  19. EndFunc
  20. Global $MyArray[3]
  21. $MyArray= _GetAVInfo()
  22. _ArrayDisplay($MyArray,'AntiVirus Product Information')

comments powered by Disqus