I am trying to write automation to a little project that I'm doing in work. In the proccess I need to disable Windows Firewall (for every Windows version) using python (I prefer activepython because it already installed).
I looked for many answers but I didn't found any answer that suits my needs.
I found this site: https://mail.python.org/pipermail/python-win32/2012-July/012434.html But the problem is that when I check from the control panel the actual disabling of Firewall is not happening...
Can someone help me with this problem?
firewall.cpl? If the latter - for all network interfaces or only specific ones? 2) what are you trying to achieve? There's likely a better way than a Python program (like Group Policy or a regular command line).subprocess.check_call('netsh.exe advfirewall set publicprofile state off'). The default profiles are "domainprofile", "privateprofile", and "publicprofile", and the state is either "on" or "off".