View Full Version : Windows Firewall Exceptions

Tyler Durden
07-18-2007, 02:31 AM

I am using InstallShield 2008 Evaluation and am trying to find a way to add exceptions to the firewall during the installation process.

I can do it from the command line using the:
netsh firewall add ... command

The problem I have is I can't find anywhere in the InstallShield IDE (using this from within Visual Studio 2005) where I can specify command lines or the like to be launched.

Searching google web/group did not provide any help as the search results all deal with launching setups from command lines.

I have seen a million setup packages do this so I am sure it can't be that hard or uncommon, but can't seem to find any information on how to do it.

Alternatively if there is a better method than the one I am considering using, I am all ears.


07-18-2007, 05:14 AM
Which product type do you use? (Basic MSI, InstallScript MSI or pure InstallScript)

For Basic MSI projects you can make use of a Custom Action (for example a VBScript CA).

For InstallScript use the LaunchApplication function.

Tyler Durden
07-20-2007, 12:47 AM
Thanks Nick

I am using an InstallScript MSI project. I managed to get the Custom Action Script working and it runs the appropriate script during installation. I have read also now that virus scanners have a tendancy to cause setups with these types of custom actions to fail, and I suspect this will be especially true in our case as we are messing with the firewall. Will just have to ensure that users turn that off when installing.

I have 2 questions now. The firswt is related to the CA script and how I can detect uninstall, as none of the properties on the CA appear to provide this option. I was trying to do another uninstall CA that would remove these exceptions, but can't seem to get the combination right or know what I can check for in the script itself to put in the logic to determine what to do.

The other is not really related to this process, but has been annoying me because I created entries for setup types that are simply being ignored and the setup package provides the standard types (Typical, Compact, Custom) even though I have specified (Client, Server, Full, Custom) as the types I created. I suspect it has something to do with the choice of InstallScript MSI?

Thanks for your help