Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Avoiding a Windows Firewall popup

My organisation produces a suite of Windows applications that make use of networking, and so when users run our software for the first time, the Windows Firewall (if it is running) brings up a pop-up, informing the user that our app(s) are trying to use the network, prompting the user to allow or deny access.

This occurs with plenty of other apps (Spotify, to give one example), but ee'd like to prevent these popups from happening, as they can be a bit problematic for our users. Some Applications (MSN Messenger, GoogeTalk) operate without ever causing the Firewall to alert the user, and we'd like to do the same.

We've successfully done this on Windows XP by having our installer write appropriate registry keys at:

HKLM\SYSTEM\ControlSet001\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\AuthorizedApplications\List

However, this does not have the same effect on Windows 7 - the Firewall popups still take place.

Any ideas how we can do this? (Our installers and software are all digitally signed.)

Thanks Tom Davies

like image 693
Tom Davies Avatar asked Aug 24 '10 16:08

Tom Davies


1 Answers

You can add exceptions to Windows Firewall by shelling out to netsh, a utility built into Windows, but the utility works differently on Windows XP and Windows 7. Here are the commands I used:

Windows XP:

add: netsh firewall add allowedprogram mode=ENABLE profile=ALL name=[exception name] program=[program path]

remove: netsh firewall delete allowedprogram profile=ALL program=[program path]

Windows 7:

add: netsh advfirewall firewall add rule action=allow profile=any protocol=any enable=yes direction=[in|out] name=[exception name] program=[program path]

remove: advfirewall firewall delete rule profile=any name=[exception name]

like image 98
Kevin Kibler Avatar answered Oct 12 '22 09:10

Kevin Kibler