
2 minute read
App Installer
Figure 84: The policies to control access to the Microsoft Store
The Store is a great distribution channel, but it may not always be the best fit for your scenario. You may need to deploy the application in an enterprise that hasn’t adopted the Store for Business, or you may want to start an internal testing of a new app. In any case, you may be interested in retaining some of the advantages of Store distribution, like automatic updates.
Advertisement
Thanks to a Windows 10 feature called App Installer, you’ll be able to retain some of the Store features by deploying the application on a website or a file share. Let’s see how it works!
App Installer is the name of the technology in Windows 10 that makes it easy to deploy MSIX packages. In the past, PowerShell was the only option for deploying a package without using the Store. Thanks to App Installer, now you can just double-click an MSIX package and proceed with the deployment with the click of a button.
Code Listing 50
<?xml version= "1.0" encoding= "utf-8"?> <AppInstaller Uri= "https://dbmsixtest.azurewebsites.net/ContosoExpenses.Package.appinstaller " Version= "1.0.5.0" xmlns= "http://schemas.microsoft.com/appx/appinstaller/2017/2"> <MainBundle Name= "ContosoExpenses" Version= "1.0.5.0" Publisher= "CN=AppConsult" Uri= "https://dbmsixtest.azurewebsites.net/ContosoExpenses.Package_1.0.5.0_x86.msixbundle " /> </AppInstaller>
The AppInstaller entry includes a property called Uri, which contains the full URL where the file itself has been deployed. The package is described with the MainBundle entry, which includes the name, version number, publisher, and the full URL where the package has been uploaded. All this information (except for the URL) must match the information included in the manifest of the application. In this case, we’re using the MainBundle entry because we’re deploying a bundle that has the .msixbundle extension. If, instead, our application is made by a single package with the .msix extension, we can use the MainPackage entry, as shown in this example.
Code Listing 51
<?xml version= "1.0" encoding= "utf-8"?> <AppInstaller Uri= "https://dbmsixtest.azurewebsites.net/ContosoExpenses.Package.appinstaller " Version= "1.0.5.0" xmlns= "http://schemas.microsoft.com/appx/appinstaller/2017/2"> <MainPackage Name= "ContosoExpenses" Version= "1.0.5.0" Publisher= "CN=AppConsult" Uri= "https://dbmsixtest.azurewebsites.net/ContosoExpenses.Package_1.0.5.0_x86.msix " /> </AppInstaller>
Once you have created such a file, you can link to it using the ms-appinstaller protocol and reference it from a webpage.
App Installer comes with support for the ms-appinstaller protocol, which you can use on a website or a file share to trigger the deployment of an MSIX package. When the user clicks on such a link in a browser, instead of having to manually download and install the MSIX package, Windows will immediately trigger the familiar user interface. In order to enable this feature, the ms-appinstaller protocol must point to a file with the .appinstaller extension. It’s an XML file that describes the package and contains information like the URL where it has been deployed.
Here is a sample file.