Search code examples
uwpappinstaller

How to auto-update a sideload UWP app without first installing with .appinstaller file


I have a UWP app that is distributed via sideload (not through the Store) for various reasons. This app has auto-updating enabled, and thus has a .appinstaller file (and associated app packages and dependencies) hosted on the web. If I install via the ms-appinstaller protocol, or by downloading and running the .appinstaller file, automatic updates work fine.

However, installing via the .appx does not allow the app to automatically update. This is a scenario because there are cases where I need to provision the app (via Add-AppxProvisionedPackage) so that it installs for any new users on a given device. Since Add-AppxProvisionedPackage doesn't seem to support .appinstaller files, and it doesn't seem like installing from the .appx package itself allows for auto-updating, how am I able to provision an app and still allow it to auto-update?

A related question is: What causes an app to check with some appinstaller file on the web for updates? Is that something that is baked into the app? Something written to the registry? Where does the information live that causes an app to check for updates?


Solution

  • However, installing via the .appx does not allow the app to automatically update.

    This is expected. The auto-update functionality is available only when you install the application using the .appinstaller file, not when installing the APPX or MSIX directly.

    From the docs:

    "You must share with your users the App Installer file, instead of the actual app container..."

    Where does the information live that causes an app to check for updates?

    In the installed package. There are some APIs available to retrieve information about apps with an App Installer association.