tags:

views:

164

answers:

2

in c# for vista+ not WMI doesn't work for vista+ How can I pull the name of the installed anti virus from WSC and if the virus database is updated or needs updating?

Thanks

A: 

the solution is to query the win32_antivirusproduct for information about the status of the installed antivirus. in fact there is a detailed article about the subject that will help you. it is in vb.net but you can simply translate the few lines.

Detect Installed Antivirus using System.Management

Microgen
That won't work for vista+ I had similar code for c# and even tried it in vb.net. I believe after vista sp1 AV's no longer write to root\SecurityCenter
Omega
check your security settings. i have vista on my desktop and it works perfectly
Microgen
@Omega, you're right - Windows Vista SP1 has a new API for Security Center. You need to use the root\SecurityCenter2 namespace instead. Check out these links: http://blogs.msdn.com/alejacma/archive/2008/05/12/how-to-get-antivirus-information-with-wmi-vbscript.aspx http://social.technet.microsoft.com/Forums/en/Forefrontclientgeneral/thread/80527cd5-5acd-414e-96fd-a21578b362a2
Helen
it works on windows 7
Microgen
A: 

An option to relying on WMI is OESIS Framework, an API to detect, classify and manage most anti-virus products introduced to the market since 2002.

The AV-specific info of the product is at http://www.opswat.com/products/oesis-frameworkae/oesis-local/antivirus