MSIX Modern Packaging – Part 3

MSIX Modern Packaging – Part 3

clip_image002

Introduction

In the last “MSIX Modern Packaging – Part 2” I showed you how to create a certificate (PFX) to use while creating MSIX packages.

In this chapter I will show you how to “capture” an easy package to MSIX.

Requirements

  • Hyper-V

Start packaging MSIX

Let’s start by fire up the Hyper-V console

Find the MSIX Packaging Tool Environment and start the virtual machine. When it asks for password for the user “Packager” please login.

clip_image004

 

On the virtual machine I start by going to a central location where we store binaries and packages.

(biggest mistake is typically that after the packaging has happened, the virtual machine reverts, and the project went with it. Not ideal. But hey, you get good at repetitions )

clip_image006

 

1. Development: if you have any scripts, projects or other tools needed during the packaging.

2. Documentation: If you need to add any information to others e.g., adding the package to the deployment system or special requirements during the packaging for remembering next time.

3. Media: For your original media

4. MSIX: For the result.

clip_image008

 

Start MSIX Packaging Tool

clip_image010

 

Click yes

clip_image012

 

Choose Application package

clip_image014

 

As you can see, we are presented with 3 choices here.

1. Create package on this computer, simply means we will do the scan on the local Hyper-V machine.

2. Create package on remote machine, simply connects to a remote machine and doing the scan. For further information on that topic Remote conversion setup in MSIX Packaging Tool – MSIX | Microsoft Docs

3. Create package on a local virtual machine, simply scan on a virtual machine from your host system. Please note that this only works with Hyper-V and not any other virtualization technologies like VMware or VirtualBox.

We choose to create package on this computer.

clip_image016

 

Click Next

clip_image018

 

1. Normally you would browse for your file and that would be the file executed and added to your package. Don’t do that. We will skip that part, as what if we had multiple files or some post operations we would like to capture to our app? Just skip that for now.

2. This is parameters for the file provided in step 1. Just skip that part as well.

3. Press the dropdown

clip_image020

 

1. Sign with a certificate (.pfx)

2. Browse for the pfx file which is located on the central storage.

3. Add password for the PFX file (you added that in the blog part2)

4. When signing, we highly recommend adding a timestamp to your certificate so that the validity of your certificate can outlast its expiration date! But in our case, we do not have any Timestamp URL to check against, so we leave it blank and if our certicate expire before the current version of the app, we will have to inject the new certificate to be able to do new installations.

clip_image022

 

Next

clip_image024

 

Fill out information accordingly to the application.

Note: Normally you would fill in “installation location” also, but not needed to capture Notepad++

clip_image026

 

INFO: This screen is just to show where the different fields go when the app is used.

clip_image028

 

Now it is time to find the executable and do the installation. (leave the wizard in this state)

clip_image030

 

Double click the notepad ++

clip_image032

 

Click ok

clip_image034

 

Click Next

clip_image036

 

Click I Agree

clip_image038

 

Leave default and click next

clip_image040

 

Leave default and click next

clip_image042

 

Click Install

clip_image044

 

Normally I recommend for the cleanest packages to NOT start the program, but in this case, I am interested in disabling auto updates.

Click Finish

clip_image046

 

Go to Settings -> Preferences…

clip_image048

 

MISC. -> remove tick from Enable Notepad++ auto-updater -> close and close notepad++ app

clip_image050

 

Click Next

clip_image052

 

Launch your app once or twice. Click Next

clip_image054

 

Click Yes, move on

clip_image056

 

Click Next

clip_image058

 

Save it to the central location in the MSIX folder we created earlier.

If you needed to do more with your package you can use the package editor, but for now press Create.

clip_image060

 

Press Close

clip_image062

 

Test the result

Go to a clean client and test your application.

clip_image064

 

Just for the fun we can compare the MSIX to the legacy installer.

clip_image066

 

Time to test the app. Double click the MSIX file

clip_image068

 

clip_image070

 

Try your new app out

clip_image072

 

When we install the MSIX it will apply to your user and not to the device. You will not see MSIX files like normal installations in the Add/Remove programs. Instead, we should use PowerShell for that.

Fire up PowerShell

clip_image074

 

Type Get-AppxPackage -name “Notepad*”

clip_image076

 

To remove the MSIX package from your test device type: Get-AppxPackage -name "Notepad*" | Remove-AppxPackage

clip_image078

Congratulations on your first package. Now keep up the pace with the next package!

 

Fun facts:

If we look into RAM consumption for a physical installed notepad++ VS MSIX packaged app of Notepad++, then MSIX is actually doing better than native. Surprisingly!

image

 

When looking on HDD size the legacy installation win with just a little. To be fair the physical installation does not have the appdata files included in this comparison which were about 2.5 mb.
image 

 

Summary

Conclusion, you better get going with that packaging!

By now we know how to build MSIX packages. It is super fun and also super easy (until it is not Smile)

Stay tuned for part 4 where we will go through UAT and a very important thing that we missed in this chapter.

+ posts

Mattias Melkersen is a community driven and passionate modern workplace consultant with 20 years’ experience in automating software, driving adoption and technology change within the Enterprise. He lives in Denmark and works at Mindcore.

He is an Enterprise Mobility Intune MVP, Official Contributor in a LinkedIn group with 41.000 members and Microsoft 365 Enterprise Administrator Expert.

Mattias blogs, gives interview and creates a YouTube content on the channel "MSEndpointMgr" where he creates helpful content in the MEM area and interview MVP’s who showcase certain technology or topic.

Official Contributor here "Modern Endpoint Management":
https://www.linkedin.com/groups/8761296/

Table of Contents

Share this post
Search blog posts
Search
Authors
Modern Workplace consultant and a Microsoft MVP in Enterprise Mobility.

Modern Workplace consultant and a Microsoft MVP in Windows and Devices.

Infrastructure architect with focus on Modern Workplace and Microsoft 365 security.

Cloud & security specialist with focus on Microsoft backend products and cloud technologies.

Cloud & security specialist with focus on Microsoft 365.

Cloud & Security Specialist, with a passion for all things Cybersecurity

Cloud and infrastructure security specialist with background in networking.

Infrastructure architect with focus on design, implementation, migration and consolidation.

Infrastructure consultant with focus on cloud solutions in Office365 and Azure.

Modern workplace and infrastructure architect with a focus on Microsoft 365 and security.

follow us in feedly
Categories

Follow on SoMe