Código
'Author: STARZ! 'Now: 2012/08/23 10:11:51 a.m. 'Purpose: Get the AntiVirus & Firewall installed 'Note: Tested on Win7x64 but should work on XP too Option Explicit Private Declare Function RtlGetVersion Lib "NTDLL.DLL" (ByRef lpVersionInformation As Long) As Long Private Function sGetAnti(sAnti As String) As String 'Thx Karcrack for the GetNuber/WinVersion Dim oObj As Object Dim sWmgmts As String Dim tOSVw(&H54) As Long tOSVw(0) = &H54 * &H4 Call RtlGetVersion(tOSVw(0)) sWmgmts = "winmgmts:\\.\root\SecurityCenter" If Join(Array(tOSVw(4), tOSVw(1), tOSVw(2)), ".") >= "2.6.0" Then sWmgmts = sWmgmts & "2" For Each oObj In GetObject(sWmgmts).ExecQuery("Select * from " & sAnti & "Product"): sGetAnti = oObj.DisplayName: Next End Function Sub Main() MsgBox "AV: " & sGetAnti("AntiVirus") MsgBox "FW: " & sGetAnti("FireWall") End Sub
Use una funcion de karcrack que obtiene la version del windows.