Main page -> FAQ -> Firewalls
See Microsoft reference
Example:
netsh firewall add allowedprogram C:\MyApp\MyApp.exe MyApp ENABLE