Click here to Skip to main content
15,923,087 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I need to find information about what antivirus and firewall was installed in Windows. I found solutions with using WMI classes, but I can’t use that one, both classes are not supported any more in latest versions of Windows. It will be better to get this information from register. I try to find some ways to do it, but I have no success. Or if you know how to get this information using API functions, please, write any examples on C#.
Posted

For the windows built-in firewall: http://msdn.microsoft.com/en-us/library/aa364726%28VS.85%29.aspx[^]

For everything else I would suggest using the code found here http://www.howtogeek.com/howto/programming/get-a-list-of-running-processes-in-c/[^] to obtain a list of active process and then using a List of known process that belong to certain AV/FW vendors to determine what is running. I would also suggest you look for active services also.
 
Share this answer
 
'This is writtne using VB Script


VB
strComputer = "." 'Can set to remote machine.

dim colItems, objItem

On Error Resume Next
Set oWMI = GetObject _
      ("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer _
     & "\root\SecurityCenter")

strText=strText & vbCrLF & vbCrLf & "Antivirus Information" & vbCrLf
Set colItems = oWMI.ExecQuery("Select * from AntiVirusProduct")
for each objItem in colItems
    strText=strText & "------------------------------------------------------" & vbCrLf
    strText=strText & "companyName: " & objItem.companyName & vbCrLf
    strText=strText & "displayName: " & objItem.displayName & vbCrLf
'    strText=strText & "instanceGuid: " & objItem.instanceGuid & vbCrLf
    strText=strText & "onAccessScanningEnabled: "
    strText=strText & objItem.onAccessScanningEnabled  & vbCrLf
    strText=strText & "productUptoDate: " & objItem.productUptoDate & vbCrLf
    strText=strText & "versionNumber: " & objItem.versionNumber & vbCrLf
    strText=strText & "------------------------------------------------------" & vbCrLf
next
WScript.echo strText
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900