codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  How to detect antivirus installed on windows 2003 server and 2008 server 2003 server R2and 2008 server R2 using WMI or other then WMI in C++  Sourabh at 03:14 on Friday, December 24, 2010
 

i have used WMI to detect that antivirus is present on OS, itz woking fine and display me information of antivirus like name and instance id on win xp and window7 by using Namespace:\root\SecurityCenter and \root\SecurityCenter, \root\Security.

if(isHLOSVersion( ))

hres = pLoc->ConnectServer( _bstr_t(L"root\\SecurityCenter2"),
// Object path of SecurityCenter

NULL, // User name. NULL = current user

NULL, // User password. NULL = current

0, // Locale. NULL indicates current

NULL, // Security flags.

0, // Authority (e.g. Kerberos)

0, // Context object

&pSvc // pointer to IWbemServices proxy

);
else
hres = pLoc->ConnectServer( _bstr_t(L"root\\SecurityCenter"),
// Object path of SecurityCenter

NULL, // User name. NULL = current user

NULL, // User password. NULL = current

0, // Locale. NULL indicates current

NULL, // Security flags.

0, // Authority (e.g. Kerberos)

0, // Context object

&pSvc // pointer to IWbemServices proxy

);

But in case of windows 2003 server and 2008 server 2003 server R2and 2008 server R2 these above namespace are not present so this is not working there.

Please let me know how can we detect that antivirus present or not windows 2003 server and 2008 server 2003 server R2and 2008 server R2 operating system.









CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums








Recent Forum Threads
•  Re: How do I use PHP with Solr?
•  Re: accessing oleVariant type of activeX component written in delphi
•  Re: How to open a MS Word document from Javascript
•  Re: where can i download javax.speech package
•  Re: Run a .bat file from VB
•  Re: How can use ASP.NET RegularExpressionValidator for alphanumeric 10 digit input
•  How to detect antivirus installed on windows 2003 server and 2008 server 2003 server R2and 2008 server R2 using WMI or other then WMI in C++
•  Re: Floating Menu
•  Re: drop down tool tip


Recent Articles
ASP GetTempName
Decode and Encode UTF-8
ASP GetFile
ASP FolderExists
ASP FileExists
ASP OpenTextFile
ASP FilesystemObject
ASP CreateFolder
ASP CreateTextFile
Javascript Get Selected Text


© Copyright codetoad.com 2001-2010