0

Of course no program should be able to add itself but are the firewall rules readable by non-privileged applications? I have an application which needs to be added to the rules for a special operation. Rather than failing silently or timing out, I'd like the application to proactively prompt the user, "I need access to port xxx and I'm not listed in your firewall rules. Please go HERE and do THIS so that I can work for you."

1 Answers1

1

Yes. The firewall rules are stored in the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\SharedAccess\Parameters\FirewallPolicy\FirewallRules registry key. While in theory you could query the key values directly, it's better to use the Windows Firewall API functions:

and31415
  • 14,610