Including XP Firewall Exceptions in a Deployment Job
Updated: 07 Oct 2008
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

The Endpoint Management Community Blog is the perfect place to share short, timely insights including product tips, news and other information relevant to the Endpoint Management community. Any authenticated Connect member can contribute to this blog.