Programmatically add an application to Windows Firewall

Not sure if this is the best way, but running netsh should work:

netsh firewall add allowedprogram C:\MyApp\MyApp.exe MyApp ENABLE

I think this requires Administrator Permissions though,for obvious reasons 🙂

Edit: I just don’t know enough about ClickOnce to know whether or not you can run external programs through it.

Leave a Comment

tech