Skip to content

[Feature] Toast Notification Uninstaller improvementsΒ #4056

@ChristianGalla

Description

@ChristianGalla

Describe the problem this feature would solve

According to the documentation the uninstaller of an unpackaged Desktop app should call ToastNotificationManagerCompat.Uninstall(); to "clean up any scheduled and current notifications, remove any associated registry values, and remove any associated temporary files that were created by the library".

I had a look in the code and it looks like this method only cleans up data of the current user and some global if the current running application has elevated permissions. Therefore, for example notifications of other users are not removed.

Also, an installer may not have the same app id because it may be a totally different program (uninstall.exe or msi). Because this method does not have an app id parameter it cannot be used to uninstall other programs.

Describe the solution

If the uninstaller has elevated permissions, the uninstall method should also clean up notifications and data of other users.

Also, a new optional parameter app id should be added.

Until this is implemented, this missing clean up should be mentioned in the documentation.

Describe alternatives you've considered

According to the documentation it is ok not to call the uninstall method on closing of a portable app if notifications should still be shown after the app was closed. If the impact of not calling this method is minimal, maybe it can be completely omitted?

An uninstaller usually does not need Toast Notifications, so the Notification library usually is not linked. As an alternative, the uninstaller may delete registry keys or folders directly without calling the uninstall method. But I do not think this is a good approach because of the manual labor.

Another option would be to let the uninstaller call the normal application using some command line parameter to only call the uninstall method.

Additional context & Screenshots

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions