It will not only work on every anti-virus on earth, but it will also tell you if the anti-virus is active! Have your application try to write one of these files on disk:.Unfortunately, it appears that Windows Server 2008 does not have the Securit圜enter or Securit圜enter2 namespace, so I get an Invalid namespace exception when trying this approach.ĭoes anyone know of a way to determine if there is antivirus software running on Windows Server 2008? Any help is appreciated! ManagementObjectCollection instances = searcher.Get() Ĭonsole.WriteLine("Antivirus Installed " + returnCode.ToString()) ![]() String wmipathstr = + Environment.MachineName + searcher = new ManagementObjectSearcher(wmipathstr, "SELECT * FROM AntivirusProduct") I have seen code samples similar to the following numerous times in my search for an answer: using System
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |