Search This Blog

Friday, March 5, 2021

MSIX Modern Packaging – Part 4

clip_image002

Introduction

In the last “MSIX Modern Packaging – Part 3” we transformed Notepad++ from a legacy installer to MSIX.

There is more to packaging like testing and make sure the application work as intended after we changed how the bits and bytes flow to the device. Most companies introduce user acceptance test (UAT) to their process of automating software, and I also think that makes sense. Someone must to take responsibility for the applications we tamper to make sure they work.

This blog post is being written based on Timothy Mangan reaching out to me. Thanks for the challenge.

 

Requirements

  • MSIX Package with context menu (like notepad++)
  • MSIX Packaging tool

 

UAT

User acceptance test comes in many flavors. Some companies use a lot for resources on this area and other not so much. Having a stable process for this kind of automation / development is crucial to save everyone’s time and in the end money. Software and package changes going back and forth are expensive and we should have process that avoids exactly that.

A workflow could look like this:

clip_image004

 

Rule of thumb when packaging

  1. Always get to know the program you are dealing with. Find out what it does and make sure you have eyes open in regard to file associations, right click context menu items, services, pre-requisites and other stuff which could be a limitation of MSIX.
  2. If the program has dependencies, find out how they should de delivered to the client. Are they already installed?
    • .net specific version
    • Vc++
    • Etc.
  3. If not installed, do they install together with your package?
    • Find out if you need to build a script to make sure they get to the client.
    • Build requisites in your deployment system.
  4. Integrations. Does the program integrate into other products, then make sure to test the integrations.
  5. After repackaging, install the program on an equivalent OS that you need the package to work with.
    • If using Endpoint manager as deployment system, make sure the test installs using SYSTEM account, as to control for data in the user directories like %Appdata% or HKCU. (this was mostly for former MSI)
  6. Launch the program and make sure it launches as expected.
  7. Have a look into the eventlog -> applications to make sure no warnings or fatal errors happen while opening the software.
  8. Click around and use some of the features in the product.
  9. Uninstall the product
    • Check your system to make sure it is clean, and nothing is left behind.

There are certainly more checks you can do, but these are the steps I go through, and will normally grant us a very high percentage of success.

According to Microsoft, MSIX delivers an impressive 99% installation success rate, making it one of the most predictable ways to deploy applications in modern environments.

Testing Notepad++

In the last blogpost we installed the package onto the system. One important feature of Notepad++ is the ability to right click a file and open it.

clip_image006

If we go back to the test client from last blog post and install the notepad++ package again and right click a file, how does it look?

clip_image008

clip_image010

Yes, missing our context menu to open known files with notepad++ and also no way of using “Open with”.

Currently this type of context menu is not supported but it has been added as backlog feature that the MSIX team are preparing to fix.

Instead of the context menu we add a filetype extension.

Right click your notepad++ MSIX package

clip_image012

 

Scroll down and open file

clip_image014

 

Copy this text

<Extensions>

<uap:Extension Category="windows.fileTypeAssociation">

<uap3:FileTypeAssociation Name="mynotepad">

<uap:SupportedFileTypes>

<uap:FileType>.txt</uap:FileType>

</uap:SupportedFileTypes>

</uap3:FileTypeAssociation>

</uap:Extension>

</Extensions>

 

Very important to be exact where you place that extension text.

clip_image016

 

And on the top line of the manifest, copy and paste this

<Package xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10" xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10" xmlns:uap3="http://schemas.microsoft.com/appx/manifest/uap/windows10/3" xmlns:uap10="http://schemas.microsoft.com/appx/manifest/uap/windows10/10" xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities" IgnorableNamespaces="uap uap3 uap10 rescap">

clip_image018

 

Save it and close notepad

There should not be any errors

clip_image020

 

Before we save the package, we need to ensure we sign the package. (it will create a version2)

Choose sign with a certificate (.pfx)

Browse for the certificate

Type password for certificate

Press save

clip_image022

 

We have not mass deployed our package yet, so press no to the increment, as we do not need to upgrade anything out there.

clip_image024

 

Save your package to the central storage

clip_image026

 

Close

clip_image028

Install the package on a client

clip_image030

 

Press Install

clip_image032

 

And as a result

clip_image034

 

Voila

clip_image036

clip_image038

Summary

Thanks, Timothy, for challenging me, otherwise this blog post would have been deploying the MSIX from a centrally managed system, instead of investigating a very crucial feature of Notepad++.

If you need to see what is in the backlog or submit ideas, then please go to this link and apply

 

In Part 5 we will deploy the MSIX to our clients from MEM!

2 comments:

  1. Hi, excellent work! Can you have multiple file types, so for example .ps1, .vbs in this entry .txt?

    ReplyDelete
  2. Thanks PTailor!

    Yes you just copy paste the hole extension into the manifest file and change the file type.

    ReplyDelete