4.5 Configuring automatic updates

You can use App Installer files to configure automatic updates. When an update check is performed, Windows checks the App Installer file used to install the packages for changes. You can configure how often this check is performed, how it is performed, and what should happen when an update is found. Automatic updates apply to all packages in the App Installer file, including your own custom Modification Packages. Automatic update configuration applies regardless of how the App Installer file was deployed.

The following is one example of how you might configure updates:

Copy
<UpdateSettings>
    <OnLaunch HoursBetweenUpdateChecks="8" 
              ShowPrompt="true" 
              UpdateBlocksActivation="false"/>
    <ForceUpdateFromAnyVersion>true</ForceUpdateFromAnyVersion>
</UpdateSettings>

Add this as a child of the AppInstaller node. In the example, it would look like:

Copy
<?xml version="1.0" encoding="utf-8"?>
<AppInstaller
  Version="1.0.0.0"
  Uri="\\my.server.local\Installers$\MyIDClientSuite.appinstaller" 
  xmlns="http://schemas.microsoft.com/appx/appinstaller/2018">
    <MainBundle
    Name="MyIDClientSuite"
    Publisher="CN=Intercede Ltd, O=Intercede Ltd, L=Lutterworth, C=GB"
    Version="1.0.0.33"
    Uri="\\my.server.local\Installers$\MyIDClientSuite_1.0.0.msixbundle" />
    <OptionalPackages>
        <Package
      Version="1.0.0.5"
      Uri="\\my.server.local\Installers$\OptionalPackages\DSKLauncher.msix"
      Publisher="CN=Intercede Ltd, O=Intercede Ltd, L=Lutterworth, C=GB"
      ProcessorArchitecture="x86"
      Name="MyIDDesktopLauncher" />
        <Package
      Version="1.0.0.5"
      Uri="\\my.server.local\Installers$\OptionalPackages\MCSLauncher.msix"
      Publisher="CN=Intercede Ltd, O=Intercede Ltd, L=Lutterworth, C=GB"
      ProcessorArchitecture="x86"
      Name="MyIDClientServiceLauncher" />
        <Package
      Version="1.0.0.5"
      Uri="\\my.server.local\Installers$\OptionalPackages\SSALauncher.msix"
      Publisher="CN=Intercede Ltd, O=Intercede Ltd, L=Lutterworth, C=GB"
      ProcessorArchitecture="x86"
      Name="MyIDSelfServiceAppLauncher" />
        <Package
      Version="1.0.0.0"
      Uri="\\my.server.local\Installers$\OptionalPackages\MyCustomMyIDConfig.msix"
      Publisher="CN=MyOrganisation, O=MyOrganisation, L=MyLocation, C=MyCountryCode"
      ProcessorArchitecture="x86"
      Name="MyCustomMyIDConfig" />
    </OptionalPackages>
    <UpdateSettings>
        <OnLaunch HoursBetweenUpdateChecks="8" 
                  ShowPrompt="true" 
                  UpdateBlocksActivation="false"/>
        <ForceUpdateFromAnyVersion>true</ForceUpdateFromAnyVersion>
    </UpdateSettings>
</AppInstaller>

When you double-click the App Installer file to launch an interactive installation, you see that the App Installer UI now indicates that the install will enable automatic updates:

AppInstaller with automatic updates

In this example, the configured behavior would be:

Note: The update behavior available to you depends on the version of Windows you are using. For example, some of the configuration in this snippet requires at least Windows 10 1903 (UpdateBlocksActivation, ShowPrompt, and ForceUpdateFromAnyVersion).

For more information on configuring automatic updates, including which features are available on which platforms, see:

docs.microsoft.com/en-us/windows/msix/app-installer/update-settings.