Windows Firewall

  • Thread starter Thread starter Luke Davis
  • Start date Start date
L

Luke Davis

Is there a programmatic way of opening ports in Windows XP/Vista or at
worst turning on/off the windows firewall? Which libraries should I be
looking in for the firewall class?

Thanks,

Luke
 
Luke Davis said:
Is there a programmatic way of opening ports in Windows XP/Vista or at
worst turning on/off the windows firewall? Which libraries should I be
looking in for the firewall class?

Thanks,

Luke



The easiest is to run the command line utility "netsh.exe" using
Process.Start.
With "netsh firewall" you can configure the firewall configuration just like
you would with the UI tool.

Willy.
 
Peter said:
Easy way:
execute
NET STOP "Windows Firewall" using the Process class.

Assuming it is relevant to check status etc. I would
guess that using ServiceController would be easier in the
end.

Arne
 
Back
Top