Creating an MSIX/APPX Package in Tanium Deploy to Simplify Package Deployment

There is a lot of value to automating software distribution, especially for large organizations: when installing software on thousands or millions of systems, it must be fast and easy to deploy. Tanium’s peering architecture not only enables fast and scalable deployments, but also has additional advantages in eliminating the need for distribution servers: cost reductions around server upkeep and licensing and eliminating risk of a single point of failure.MSIX is a newer technology that is intended to replace the legacy "Windows Installer" (MSI) method.

This article discusses how to create a package to distribute an MSIX (new Windows Installer) or APPX (Universal Windows Platform app) file.

Before starting, verify that you have your signed and trusted MSIX or APPX file.  For more information on these file formats, please refer to this article:

About the Packaging Process: https://docs.microsoft.com/en-us/windows/msix/package/packaging-uwp-apps

Next, you will need to create a Deploy package.  In this scenario, I will be packaging an app called "FakeApp" from TestApp for the purpose of this article.  Any resemblance to released software is purely coincidental.

Package Files

You will need to upload your MSIX or APPX file to the Tanium Package.


CranMSIXAPPXPac_d1c1372b-2a5a-40d2-91bd-6ddd1be1eebe.png

General Information

This information can be what you like, according to the program you're installing. Keep in mind that the description and Self-Service Display Name is seen by end users in Self Service.


CranMSIXAPPXPac

Deploy Operations

I don't have a previous version to update, so I will just use Install and Remove in my example.


CranMSIXAPPXPac

System Requirements

This app takes hardly any space to install or memory to run, so I left the disk space and RAM requirements at 0. The app is compiled for 64-bit, so I want to ensure that is selected.The app supports Windows 10 only. For your deployments, make sure you understand the system requirements and minimum operating system it will run on.


CranMSIXAPPXPac

Requirements

This application runs in Windows 10 1709 and later, so for this I added a WMI query to insure the Windows build number was equal to or greater than 16299 (Windows 10 1709).


CranMSIXAPPXPac

Deploy Operation - Install

Display Name is what you want it to be, the Command Timeout is dependent on how long the app will take to install.  Be generous, if it takes 5 minutes, give it 10-15 to be safe.

We will be running as the Active User, even though the app installs into C:\Program Files.  This is how Microsoft provisions these apps.

The command line in this case is: *powershell.exe -ExecutionPolicy Bypass -command "& {&'add-appxpackage' -Path .\FakeApp_1.0.4.msix}" *

The syntax can be a bit difficult to run a single cmdlet.  Use caution in testing. Note that the .\ is the relative path to the downloaded file from Deploy.


CranMSIXAPPXPac

Remove

The same rules apply for the Display Name and Command Timeout. We are again running as Active User.

This is my removal command: 

Again, be careful of the syntax of your command line.


CranMSIXAPPXPac

Install Verification

This can be a bit difficult to do, but one way to verify the app is installed is to look for the file path existing.

The app will install into %ProgramFiles%\WindowsApps\ and then a naming convention like this:AppName_AppVersion_Architecture__Hash

From there, the app installs into a Virtual File System, where you will find the executable as per the example below.  Always install your app manually first and understand how it installs and where.  This will make detecting the installation much easier and lessen your testing time.


CranMSIXAPPXPac
Once you're ready, click 
CranMSIXAPPXPac
 and you will be ready to deploy your MSIX/APPX package.

Quick Troubleshooting Notes

Three of the most common problems I have seen with these deployments are within code signing and install verification.  The deploy.log on the endpoint will be your guide for this.

  1. If your file is not properly signed, you will see an error like this in the deploy.log:*"Add-AppxPackage : Deployment failed with HRESULT: 0x800B010A, A certificate chain could not be built to a trusted root"

2. *If your install verification isn't properly detecting the file, you will see an error like this in the deploy.log: *"applicability does not match operation outcome" *Assuming the application installed properly, check the Install Verification and make sure that it aligns with the installed application.

  1. The command doesn't execute properly. Again, this syntax can be a bit tricky, follow the examples above in the Install and Remove Operations.

Additional Information

For more information on deploying packages, view the Tanium Deploy documentationNo Content found for /db/organizations/tanium/repositories/master/content/documents/userguides/deploy/deploying_software.dita .