Jump to content

Windows Firewall


Andon
 Share

Recommended Posts

Hello, is it possible to check the status of Windows XP firewall (on / off) and able to control it?

Thanks for your help.

EDIT:

OK, I use netsh, but if there is solution using Autoit I'll by very intrested

Edited by Andon
do not beat, I'm new
Link to comment
Share on other sites

I wrote this snippet awhile ago. It's sloppy but it works, maybe it'll give you something to start with.. Oh, you could probably use ControlClick to interact with the Firewall..

Run("control Firewall.cpl")
WinWaitActive("Windows Firewall")

$sVar = ControlGetText("Windows Firewall", "", 205)

If StringInStr($sVar, "on") Then
    ConsoleWrite("The Firewall is ON" & @CR)
Else
    ConsoleWrite("The Firewall is OFF" & @CR)
EndIf
WinClose("Windows Firewall")

- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...