Bloom.MiscUI.BloomIntegrityDialog.InstalledAntivirusPrograms C# (CSharp) Method

InstalledAntivirusPrograms() private static method

private static InstalledAntivirusPrograms ( ) : string
return string
        private static string InstalledAntivirusPrograms()
        {
            string result = "";
            #if !__MonoCS__
            string wmipathstr = @"\\" + Environment.MachineName + @"\root\SecurityCenter2";
            try
            {
                var searcher = new System.Management.ManagementObjectSearcher(wmipathstr, "SELECT * FROM AntivirusProduct");
                var instances = searcher.Get();

                foreach(var instance in instances)
                {
                    result += instance.GetText(System.Management.TextFormat.Mof).ToString() + Environment.NewLine;
                }
            }
            catch(Exception error)
            {
                return error.Message;
            }
            #endif
            return result;
        }