Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Delphi - How can I detect presence of Anti-Virus Software?

When anti-virus software is running during the installation of my software certain components do not get installed correctly. I always tell the users to turn it OFF first. But, they forget and then I am racking my brains trying to figure out what went wrong. Is there a Delphi function that anyone knows about that can detect whether AntiVirus software is running, so I can alert the user before installation starts?

like image 670
Brett Graffin Avatar asked Aug 27 '10 20:08

Brett Graffin


1 Answers

Since XPsp2, there is the security center that registers if there is a known antivirus.

Afaik this functions over the WMI api, which can be accessed via Winapi. (and Jedi has headers for it).

I've found some VBScript here: http://blogs.msdn.com/b/alejacma/archive/2008/05/12/how-to-get-antivirus-information-with-wmi-vbscript.aspx

Another tip: try to communicate to your users in any way possible to turn off heuristic scans as much as possible. These are typically the cause of false positives, and it can be an easier message to bring than killing the antivirus all together.

like image 116
Marco van de Voort Avatar answered Sep 30 '22 03:09

Marco van de Voort