Feedback

VB - Antivirenprogramm ermitteln

Veröffentlicht von am 12/31/2011
(0 Bewertungen)
    Function GetAV()
        Dim objSecurityCenter As Object, colAntiVirus As Object, objFileSystem As Object, CountAV As Integer, info As String = ""
        objSecurityCenter = GetObject("winmgmts:\\localhost\root\SecurityCenter2")
        colAntiVirus = objSecurityCenter.ExecQuery("SELECT * FROM AntiVirusProduct", "WQL", 0)
        objFileSystem = CreateObject("Scripting.fileSystemObject")
        CountAV = 0
        For Each objAntiVirus In colAntiVirus
            CountAV = CountAV + 1
            If CountAV > 1 Then
                info = info & ", " & objAntiVirus.displayName
            Else
                info = info & objAntiVirus.displayName
            End If
        Next
        Return info
    End Function
Abgelegt unter AV, Antivirus.

Kommentare zum Snippet

 

Logge dich ein, um hier zu kommentieren!