>>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 Thanks TJG. It works now. I am able to read/write Hnet_ConnectionProperties(). But I still need to use object.Put_(). But the problem is that when I check from the control panel the actual disabling of Firewall is not happening. I want to do the equivalent of "netsh firewall set opmode mode=disable profile=ALL" <Code> c = wmi.WMI(namespace="root/Microsoft/HomeNet") for domain in c.HNet_ConnectionProperties(): print domain domain.IsFirewalled = False domain.IsIcsPrivate = False domain.IsIcsPublic = False domain.Put_() print "After disabling" print domain </Code>
_______________________________________________ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32