Share via

Automatically delete Firewall rules when uninstalling WinUI3-desktop app installed from Windows Store

Jos Huybrighs 136 Reputation points
2021-10-18T14:24:55.037+00:00

I am in the process of migrating my current Desktop-Bridge app (available on Windows Store) to a WinUI 3 Desktop app. The intention is to release it at some point in time when the Windows App SDK 1.0 is available for production use.
The migrated app has a user option to listen for TCP/UDP connections on the local network. This requires a inbound firewall rule which the user must accept when windows defender firewall pops up.

The question that now comes up is whether this rule will be automatically removed when the app is being uninstalled.
If not, are there other possibilities for removing the rule, e.g. some kind of possibility to execute a custom uninstall script and how would that work when the app doesn't have the necessary access rights?

The current UWP/desktopbridge version of the app has similar networking possibilities but there it looks like the firewall rules are automatically added.

Windows for business | Windows Client for IT Pros | User experience | Other

Your answer

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