views:

369

answers:

2

Hi

Can you please tell me, is there any way to programatically add an .exe file to the exception list for the Windows Vista firewall to allow it to run normally? I'm using VC++.

+1  A: 

I don't know for certain about the Vista firewall, but I would defeinitely excpect that it is a violation of the security of any computer to allow programmatic access to firewall exception lists. I would be very surprised if Windows allowed arbitrary code to fiddle with the Firewall in this way.

The user sitting in front of the computer, or a network administrator setting network wide security policies would be the only two who should be able to do this. Notice that they are both actual people doing the process interactively.

Ash
+1  A: 

Yes - if you take a look at the WindowsFirewallAddApp method here, it should give you some ideas how to do it.

Pete OHanlon
Vista Firewall, one and only firewall in the world that can be disabled programatically by any program.
Clement Herreman