Hi Vortex,
Not elegant, but works, using the function system.
The following 2 are outdated but still work in Windows 10.
fwAppAdd db "netsh firewall add allowedprogram ""%s"" MyApp ENABLE>NULL",0
fwAppDisable db "netsh firewall add allowedprogram ""%s"" MyApp DISABLE>NULL",0
We have also these:
fwAppRemove db "netsh firewall delete allowedprogram ""%s"">NULL",0
fwFirewallOff db "netsh Advfirewall set allprofiles state off>NULL",0
fwFirewallOn db "netsh Advfirewall set allprofiles state on>NULL",0
fwStatus db "netsh Advfirewall show allprofiles",0