How to disable windows firewall settings

2019-06-09 04:09发布

问题:

I am doing firewall related work. I can turn ON/OFF windows firewall programatically using COM interface but I want to disable turn ON/OFF options. Is there any COM interface, Windows API present for that?

回答1:

This behavior is triggered by the presence of Group Policy for the firewall, specifically the Windows Firewall: Protect all Network connections setting.

As per How to disable Windows Firewall using python, you need to enable this setting in any of the available ways outlined there.