Re: windows firewall config settings exportable?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Torgeir Bakken \(MVP\) (Torgeir.Bakken-spam_at_hydro.com)
Date: 10/13/04


Date: Wed, 13 Oct 2004 02:16:50 +0200

elmurado wrote:

> Thanks Torgeir. Is there any way of 'grabbing' those settings?
> ie do they exist somewhere in a form which can be captured.

You can display the settings like this (in a command prompt):

netsh.exe firewall show config

For a more detailed listing:

netsh.exe firewall show config verbose = ENABLE

To a file:
netsh.exe firewall show config verbose = ENABLE >fw_cfg.txt

> Another question, is there a way of using runas on the firewall
> or is it impossible because it is a service?

It might work to run netsh.exe with runas.

For the GUI configuration, this might work with runas:

control.exe firewall.cpl

-- 
torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of
the 1328 page Scripting Guide:
http://www.microsoft.com/technet/scriptcenter/default.mspx


Relevant Pages

  • Re: Cscript and Wscript Messages
    ... > enable the Internet Connection Firewall on Windows XP Professional. ... > thet are prompted to execute the script. ... Administration scripting examples and an ONLINE version of the 1328 page Scripting Guide: ...
    (microsoft.public.scripting.wsh)
  • Re: Turing of SP2 Firewall via registry entry?
    ... The man is a scripting genious. ... > run in RunServicesOnce or RunOnce from the Registry upon the reboot. ... programmatically without extracting the SP2 EXE file. ... WF_XPSP2.doc "Deploying Windows Firewall Settings for Microsoft ...
    (microsoft.public.windowsxp.security_admin)
  • Re: firewall wont turn on
    ... >> from there and i get a message saying the firewall settings cant be displayed ... Follow prompts and reboot. ... > torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway ... i went to the security center and it said ...
    (microsoft.public.windowsxp.security_admin)
  • Re: SP2 and Port 135
    ... > their firewall ... If e.g. the File & Print Sharing exception is enabled, ... -- torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway Administration scripting examples and an ONLINE version of the 1328 page Scripting Guide: ...
    (microsoft.public.windowsxp.general)
  • Re: SP2
    ... >> use the internet and gave me the option to unblock it, ... The Windows Firewall doesn't do outbound blocking. ... You are correct about the outbound blocking part, ... -- torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway Administration scripting examples and an ONLINE version of the 1328 page Scripting Guide: ...
    (microsoft.public.windowsxp.general)