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

2012-07-08 Thread prashant padaganur
>>On 06/07/2012 14:36, prashant padaganur wrote: >>* Thanks. But does not help still. I am getting the same com error. *> > >import wmi > >c = wmi.WMI(namespace="root/Microsoft/HomeNet") >for whatever in c.HNet_ConnectionProperties(): >print whatever > > > > >I'm not in a position to try it, b

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

2012-07-06 Thread Tim Golden
On 06/07/2012 14:36, prashant padaganur wrote: > Thanks. But does not help still. I am getting the same com error. import wmi c = wmi.WMI(namespace="root/Microsoft/HomeNet") for whatever in c.HNet_ConnectionProperties(): print whatever I'm not in a position to try it, but I don't imagi

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

2012-07-06 Thread prashant padaganur
On Fri, Jul 6, 2012 at 7:00 PM, Amaury Forgeot d'Arc wrote: > 2012/7/6 prashant padaganur : > > c = wmi.WMI("WinMgmts:\root\Microsoft\HomeNet") > > The \r is a special sequence, interpreted as a "carriage return" character. > You should use a raw string: > r"WinMgmts:\root\Microsoft\HomeNet" > > -

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

2012-07-06 Thread Amaury Forgeot d'Arc
2012/7/6 prashant padaganur : > c = wmi.WMI("WinMgmts:\root\Microsoft\HomeNet") The \r is a special sequence, interpreted as a "carriage return" character. You should use a raw string: r"WinMgmts:\root\Microsoft\HomeNet" -- Amaury Forgeot d'Arc ___ pyt

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

2012-07-06 Thread prashant padaganur
Hi, I am trying to disable the Windows Firewall using WMI. Below is the code. When I am running the VBscript I am not getting any errors. But my python script is coming out with some COM errors. (pasted below) Am I doing something wrong? Here is the code. import wmi,os c = wmi.WMI("WinMgmts:\