Concern about Anti Virus script using WMI Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Georgie Munteer

Concern about Anti Virus script using WMI  Topic is solved

23 Nov 2017, 12:24

The code was placed by jNizM here
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
}

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Anput, Google [Bot], mcd, mikeyww, Nerafius and 132 guests