Firewall information issue

N

Nadir

Hello

I have windows XP SP2 installed and i wrote a WMI script to detect if
windows firewall is enabled or not. Here is the scripts:

set WMI = GetObject("WinMgmts:\root\Microsoft\HomeNet")
set objs = WMI.ExecQuery("SELECT * FROM HNet_ConnectionProperties WHERE
IsFirewalled = TRUE")

for each obj in objs
WScript.Echo obj.GetObjectText_
next


But the problem is that this does not detect and change in the status of
windows firewall status, and returns the same result wether i disbale the
windows firewall or enable it.

Does anybody has any idea what is wrong in this approach?

Regards

Tariq
 
E

elvishkp

The propertyflag on the HNet_ConnectionProperties for IsFirewalled I
don't think change. You can test this by echoing the value in your
script and then test. As I understand it, if you remove the binding
(Windows Firewall) then you can check, but that isn't the same as just
disabling it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top