Deploying Microsoft Store Apps

9. maj 2020
Microsoft Store Apps

by Dan Svendsen, Chief Product Officer

Store Apps: The primary purpose of this article is to provide you with a solution on how to install Microsoft Store apps through CapaInstaller.

However, much of the content can also be valuable, if you are managing another client management tool.

Challenge

If you want to deploy Microsoft Store apps through a client management tool, you will probably face 2 major challenges.

  1. Installation files for Microsoft Store apps are not always easy to obtain and are rarely provided as MSI or EXE files.
  2. Microsoft Store Apps are user-based, and most client management tools are executing scripts in the SYSTEM account context

Download application files for deployment

First we need to download the installation files for the Microsoft Store app – these files are using AppxBundle as file extension.

In this article we will use the Microsoft Wireless Display Adapter app.

Open the Microsoft Online Store (not the built-in Microsoft Store) in your favorite webbrowser and search for the desired app.

Microsoft Store Apps

Copy the URL from the address bar.

Microsoft Store Apps

Remove all text after and including the question mark.

Microsoft Store Apps

Open your favorite online link generator for Microsoft Store. In this example we are using https://store.rg-adguard.net/

Copy the link into the online link generator and choose Retail as type

Microsoft Store Apps

You are now presented with a long list of files for the both the application and for all the mandatory prerequisites.

Download the newest version of the application (AppxBundle) you want to install.

Microsoft Store Apps
Microsoft Store Apps
Microsoft Store AppsYou have now solved the first major challenge

Enable Apps Sideload

Before we can install the application, we need to allow Windows to Sideload apps

You can use the interface to enable the setting

Microsoft Store Apps
Microsoft Store Apps

.. or you can use the registry editor to enable the setting

Microsoft Store Apps

Test installation

We are now ready to test the installation. Install the downloaded application using the PowerShell command below from an elevated PowerShell command prompt.

Add-AppxPackage -Path C:tempMicrosoft.SurfaceWirelessDisplayAdapter_3.4.137.1000_neutral___8wekyb3d8bbwe.AppxBundle

Microsoft Store Apps

Deploy through CapaInstaller

CapaInstaller has an option to execute package scripts in user context – the scripts are called User Configuration Scripts

User configuration scripts are executed the first time a user logs on, after the computer package containing the user configuation script has been installed.

Hence, all you need to do, is to create a computer package with a user configuration script.

Microsoft Store Apps

The main script in the computer package is used to copy the installation files to a temporary location on the computer.

The user configuration ccript in the computer package is used to install the application from the temporary location.

Microsoft Store AppsYou have now solved the second major challenge and are ready to deploy the Microsoft Store app.

Field Notes

This section contains various notes from the field, that might come in handy when deploying or testing Microsoft Store apps.

Application Dependencies

Even though AppxBundle files contains all mandatory dependencies, sometimes a core component in the operating system is outdated and not compatible with the application that you are trying to install.

In the example below, we are trying to install the Microsoft Company Portal 2019 app, but the Microsoft .NET Framework component is outdated. The required .NET component version is 2.2.27405.0 but the installed version is 2.2.27011.0

Microsoft Store Apps

If you already have the concerned app installed somewhere, you can query all the mandatory dependencies using the PowerShell command described later in this post.

Installation as Local System Account

As I mentioned earlier, one of the major challenges when you want to install Microsoft Store apps, is that they are user-based.

Trying to install a Microsoft Store app using the SYSTEM account often causes failure, as the one below.

Add-AppxPackage -Path C:tempMicrosoft.SurfaceWirelessDisplayAdapter_3.4.137.1000_neutral___8wekyb3d8bbwe.AppxBundle

Microsoft Store Apps

Internet Access

Microsoft Store apps requires internet access the first time they are started.

Without internet access, the app will only blink, the first time it is started.

PowerShell Commands

Get-AppxPackage

When a Microsoft Store app is installed, you can view the prerequisites (also called dependencies) by running the command below.

Get-AppxPackage -Name Microsoft.Surface*

Microsoft Store Apps

Remove-AppxPackage

If you need to uninstall a Microsoft Store app, you can run the command below.

Get-AppxPackage -Name Microsoft.Surface* | Remove-AppxPackage

Microsoft Store Apps