Detect if virusscanner is installed

  • Thread starter Thread starter Jeroen
  • Start date Start date
J

Jeroen

Hi,

I need to create a small app that will detect if a virusscanner is installed
and if it's up-to-date. Just like the Windows Security Center does. This
will be used for remote monitoring using a special app that calls scripts or
console apps that respond with a specific code. Systems will all be running
Windows XP (Pro).

Any suggestions? Thanks in advance.


Jeroen
 
Just as Security Center, you can not for certain determine if there is
an anti-virus program installed. You can look for some known programs,
and show a warning if none of those were found. Checking if the
anti-virus program is up to date would have to use a specific method for
each program.
 
I'm aware of that. I want to monitor most commonly used scanners, just like
Windows does. I would like to know if there's a way to poll the Windows
Security Center for the status of the virusscanner. That's enough. I don't
want to program my own routines for 1001 different virusscanners.


Jeroen
 
The WMI method looks like a good way for basic checks. I tried the code
below but without any results...

Dim scope As New ManagementScope("\\.\root\SecurityCenter")
scope.Connect()
Dim sSQL As String = "Select * from AntiVirusProduct"
Dim oQuery As New System.Management.ObjectQuery(sSQL)
Dim oSearcher As New System.Management.ManagementObjectSearcher(oQuery)
Dim oResult As System.Management.ManagementObject
For Each oResult In oSearcher.Get()
Console.Write("Name : " & oResult("displayName") & vbCrLf)
Next

oResult equals Nothing.
 
How much of our boxes do have Windows Vista right now? And how many will
switch over to a new OS while their current OS came with the PC? I don't
want to offend you but it's about 300 workspaces to check on a daily base.

It will take a long time (years) before Vista will be the default OS. For
most users Vista does not have added value (policies prevent them from using
graphic rich environments).


Jeroen
 
Jeroen,

Why you would offend me with this, it was just an idea that came in my mind
reading your message, it is forever your choose what you do.

But as you were building a tool for the market, it could be something wise
to think about. I had not the idea that you wrote that you needed it for an
in house solution.

Cor
 
Back
Top