Understanding Windows App Installer
With the news this month that Microsoft could be preparing to retire the Microsoft Store for Business; the saga of Universal Windows Platform (UWP) apps, which were meant to be the new modus operandi for Windows developers; and the Desktop Bridge, which allows developers to bring win32 apps to the Microsoft Store; the Windows 10 app story is a complicated one.
The future of the consumer Microsoft Store app in Windows 10 is unclear at the moment but nonetheless, Microsoft is gradually developing a technology called Windows App Installer to provide most of the features of the Store but for standalone app installers. In this article, I’m going to look at the beginnings of Windows App Installer, how it evolved into what it is today, and what the future might hold.
Sideloading app packages in Windows 10 Anniversary Update
Before the Windows 10 Anniversary Update, if you wanted to sideload an app package, i.e. install an app package directly from an .appx file without going through the Microsoft Store, you needed to run a PowerShell script using the Add-AppxPackage cmdlet.
That all changed in the Anniversary Update with the introduction of App Installer, a new Windows 10 component. With App Installer, all you need to do is double click an app package and a dialog appears prompting you to install the app. It provided a much-simplified experience for sideloading app packages.
Remote sources, app package definitions, and auto updates in the Windows 10 April 2018 Update
The new app package installation experience was welcome, but it was designed for app package files already available on the local system disk. In Redstone 4, or the Windows 10 April 2018 Update as it later became known, Microsoft expanded the capabilities of App Installer so that it could be used to install app packages from remote sources, like file shares and websites.
Also, Microsoft added support for metadata defining an app package. The metadata lets you specify the main package, any optional packages linked to the main package, and any required app dependencies. App package definitions are created as .XML text files with an .appinstaller extension. The files can be created with a text editor or generated using Visual Studio.
Automatically updating applications with Windows App Installer
But probably the most important feature of Windows App Installer is the ability to automatically update UWP and Desktop Bridge AppX and MSIX applications without using the Microsoft Store. Developers just need to publish a new .appinstaller file and a new package, with a higher version number, in the same remote location using the original website URL or file share UNC.
For more information on MSIX, Microsoft’s latest installer technology, see Improve Windows Enterprise Application Deployment Reliability and Security using MSIX and MSIX Core Coming to Windows 7 and 8.1 in December, Plus New Features on the Horizon on Petri.
If you are using Visual Studio to package your apps, when creating an app package for sideloading, you will be asked whether you want to enable automatic updates. You also get the option to automatically increment the app version number.
In the Windows 10 April 2018 Update, there are two options for auto-updating apps. You can either have Windows App Installer check for an update each time a user launches the app or check periodically, for example, every day or once a week.
If you choose to periodically update an app, it will update in the background on the defined schedule without any user interaction. If a user tries to launch the app while it is being updated, a dialog will appear informing them that the app is being updated and that they should try again in a few minutes.
When sideloading an app package by double-clicking on a package file, if the package is signed, you will also see a link to the publisher certificate under Additional Links in the installer dialog. Using the link, users can download and install the certificate. Enterprise users probably won’t need to do this as their devices should already trust apps distributed by the company.
Improved Auto-Updating in Windows 10 May 2019 Update
In Windows 10 version 19H1, Microsoft improved the auto update experience to provide an update prompt when a user starts an application if there is a new update available. The previous behavior required users to restart an application if an update was deployed on the server before they knew that a new version was available.
The previous behavior could be problematic for apps that are rarely restarted. In 19H1, users will see a prompt that allows them to either apply the update immediately or continue to start the app and apply the update then the app is closed. A new optional attribute also allows developers to force users to apply an update if it contains a critical bug fix. The previous behavior allowed users to postpone updates. It’s also possible to build the ability to check for updates into apps.
Manually downgrading apps
Downgrades are also supported but can’t be done automatically. In previous versions of Windows 10, App Installer only supported installing apps with a higher version number. But users can now manually install an app with a lower version number than the one that is currently installed on their system.
What’s coming in Windows 10 version 2004 (20H1)
Due sometime in spring 2020, Windows 10 version 2004 includes a couple of updates to the application installer story. Microsoft’s MSIX installer technology will become a native file format and sideloading apps will be enabled by default. I.e. signed application packages can be installed without changing ‘Developer’ settings in the Windows 10 Settings app. Although the option to disable the ability to sideload applications remains.
It’s clear that Microsoft is preparing to give developers and enterprises more flexibility in how they distribute and manage the lifecycle of installed applications. Rumors suggest that while the consumer Microsoft Store app might not have a future in Windows 10, it’s likely that a web version of the Store will remain.
Nevertheless, while I like the idea of a curated app store, there are other ways to establish whether applications are trusted by Microsoft and safe for users to install. Or whether they are approved by an enterprise. It will be interesting to see if the Microsoft Store for Business disappears, how Microsoft will build out alternative controls for enterprises not using Intune or Microsoft Endpoint Manager, formerly System Center, to manage applications.