To remove an application that has been installed in the advertised state, simply uninstall it using MsiInstallProduct or MsiConfigureProduct. You can also remove an advertised application from the command line. See Command Line Options.
Note that you may be unable to remove an advertised application if you have authored the package in such a way that running an installation is conditional upon the statement NOT Installed. An advertised application is not installed on the user's computer and the installer does not set the Installed Property. The package must be authored so that advertised applications can be uninstalled.
Source: Microsoft Learn / Windows Win32 documentation by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.
