Is there any generic way (API, class, command or system tool) to list down all applications & ports, allowed or blocked by antivirus software installed on a local system?
-
Tuesday, March 06, 2012 4:34 AMLooking for inputs on Antivirus settings.
Is there any generic way (API, class, command or system tool) to list down all applications & ports, allowed or blocked by antivirus softtware installed on a local system?
Antivirus software can be any one on a local system.
I know by using Win32_Antivirus class we can list down installed antiviruses and its' details but not about blocked or allowed ports.
- Edited by SanyoJ Tuesday, March 06, 2012 4:36 AM
All Replies
-
Thursday, March 08, 2012 6:52 AMModerator
Excuse me, where do you find the "Win32_Antivirus" class?
I just know there's the "AntiVirusProduct" class in the "\root\SecurityCenter" namespace.
And if the anti-virus and firewall products operate the system firewall to close/open the ports, then we can use Windows functions(API or WMI classes) to find it, otherwise, I'm afraid that it belongs to their products configuration for current user, the system functions cannot find it.
We can do is just query the system/user level opening ports, instead of the application level, except you can query the settings files which some products have to config the ports management.
You can try this script: http://blogs.technet.com/b/heyscriptingguy/archive/2009/05/22/quick-hits-friday-the-scripting-guys-respond-to-a-bunch-of-questions-05-22-09.aspx
It is using the ping way to know which port is opening, I think this can be seen as a user to use the current users antivirus environment, it can achieve your goal.
Or we only can check is the firewall, I think: http://msdn.microsoft.com/en-us/library/windows/desktop/aa365294(v=vs.85).aspx
http://msdn.microsoft.com/en-us/library/bb945065.aspx
Mike Zhang[MSFT]
MSDN Community Support | Feedback to us
- Marked As Answer by Mike Dos ZhangMicrosoft Contingent Staff, Moderator Wednesday, March 14, 2012 12:12 PM


