Firewall information issue

  • Thread starter Thread starter Nadir
  • Start date Start date
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
 
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.
 
Back
Top