Client Management Suite

 View Only

Including XP Firewall Exceptions in a Deployment Job 

Oct 07, 2008 04:54 PM

When packaging an application requiring an exception within the XP firewall, you can automate the exception using netsh.

The XP firewall can be configured using the firewall command of the netsh utility. For full usage options, type the following:

netsh firewall ?

To add a program exception to the firewall, you will need to specify a descriptive name for the exception and the path to the executable. For this example, we'll use a description of SomeAppException and an executable path of C:\Program Files\SomeApp\App.exe.

The following script performs a check to ensure that XP is running, then calls the netsh command.

REM Allow exception in XP Firewall

REM Only perform this for XP
ver | find "XP" > nul
if %ERRORLEVEL% == 0 goto Is_XP
goto exit

:Is_XP
:Run Windows XP-specific commands here.
netsh.exe firewall set allowedprogram program = "C:\Program Files\SomeApp\App.exe" name = "SomeAppException" mode = ENABLE profile = ALL

:exit

Statistics
0 Favorited
1 Views
0 Files
0 Shares
0 Downloads

Tags and Keywords

Related Entries and Links

No Related Resource entered.