Programmatically Add Exception to windows vista firewall

痞子三分冷 提交于 2020-01-03 03:25:09

问题


Is there any way to programmatically add an .exe file to the exception list for the Windows Vista firewall to allow it to run normally? I'm using VC++.


回答1:


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




回答2:


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.



来源:https://stackoverflow.com/questions/1409896/programmatically-add-exception-to-windows-vista-firewall

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!