https://autohotkey.com/board/topic/9613 ... -snippets/
and when i run the test with windows defender on and real time protection enabled it says disabled
im wondering if maybe something is wrong with my computer?
can someone that has windows defender with real time protection enabled test this? im running on windows 10
Code: Select all
objWMIService := ComObjGet("winmgmts:\\localhost\root\SecurityCenter2")
colItems := objWMIService.ExecQuery("Select * from AntiVirusProduct")._NewEnum
while colItems[objItem]
{
MsgBox, % "AntiVirus:`t`t" . objItem.displayName . "`n"
. "Guid:`t`t" . objItem.instanceGuid . "`n"
. "ProductExe:`t" . objItem.pathToSignedProductExe . "`n"
. "ReportingExe:`t" . objItem.pathToSignedReportingExe . "`n"
. "RealTimeProtection:`t" . ((SubStr(DecTo(objItem.productState, 16), 3, 2) = 10) ? "Enabled" : "Disabled") "`n"
. "VirusDefUpdate:`t" . ((SubStr(DecTo(objItem.productState, 16), 5, 2) = 00) ? "Up to Date" : "Out of Date")
}
DecTo( n, to ) {
hex := "0123456789ABCDEF"
while ( n > 0 ) {
rem := mod( n, to )
n /= to
y := SubStr( hex, rem + 1, 1 )
result = %y%%result%
}
return, "0" . result
}