[python-win32] How to disable Windows Firewall using WMI

Tim Golden mail at timgolden.me.uk
Fri Jul 6 16:12:01 CEST 2012


On 06/07/2012 14:36, prashant padaganur wrote:
> Thanks. But does not help still. I am getting the same com error. 


<code>
import wmi

c = wmi.WMI(namespace="root/Microsoft/HomeNet")
for whatever in c.HNet_ConnectionProperties():
    print whatever


</code>

I'm not in a position to try it, but I don't imagine you want
the quotes round "False" (that's a string; you want the boolean).
And you certainly don't need the Put_ -- the wmi module does that for
you. (It has to justify its existence somehow; it doesn't do much else!)	

TJG


More information about the python-win32 mailing list