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