WFP APIs to export/import rules, instead of about to be deprecated netsh command like - netsh advfirewall export "C:\firewall-rules.wfw"

Prokash Sinha 81 Reputation points
2022-02-15T18:45:57.1+00:00

Is there a programmatic way to export/import firewall rules without using netsh cmd and using Windows security App ?

Thanks,
Prokash

Windows development | Windows API - Win32
{count} votes

1 answer

Sort by: Most helpful
  1. Sinha Prokash 46 Reputation points
    2022-02-21T14:44:14.577+00:00

    From Firewall module ( *.exe ) there seems to be no APIs to dump and retrieve these from/to file. We need to shell out to cmd / powershell !

    Was looking for a set of APIs ( WFP based ).

    Thanks,
    Prokash

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.