问题
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.
回答2:
You can Turn off windows firewall through command line.Just paste this command in your command prompt.
netsh advfirewall set currentprofile state off
来源:https://stackoverflow.com/questions/25022533/how-to-disable-windows-firewall-settings