Simple, safe, reliable software installs and uninstalls are always best, but getting there isn’t easy. Applications break each other—or even the operating system itself.
MSIX, Microsoft’s packaging format, is the newest replacement for the decades-old Microsoft Software Installer (MSI) and setup exe installer technologies. MSIX is gaining acceptance and wider adoption because of the benefits it delivers: security, ease of use and reliability in application installations.
MSIX provides a new, modern runtime environment intended to protect both your application(s) and end user systems. Enterprise users prefer the MSIX format because it provides the most appropriate framework to modernize applications; simultaneously reducing IT departments’ workloads when preparing application package(s) for delivery to hundreds or thousands of end users.
As developers who build Windows desktop applications embrace the concept of running code in an MSIX container, understanding certain key concepts can streamline and strengthen their application installation experience.
Why MSIX?
Running code in an MSIX container can solve common problems encountered by developers coming from non-containerized deployments. This includes products built and delivered as a Win32, .Net Framework or Universal Windows Platform (UWP) packages—or when starting a new project from scratch.
In addition to providing clean installation and uninstall processes, MSIX enables enterprise customization in independent packages via modification packages. It also supports the ability to deploy applications through enterprise tools (e.g., Microsoft Endpoint manager) or to the cloud (Azure Virtual Desktop, MSIX app attach).
Value for Developers and IT Pros
MSIX improves upon the more restrictive model of UWP while still running in a container. It allows developers to code in their preferred way (e.g., unmanaged code using Windows Forms, calling the Win32APIs or managed code using XAML and .NET framework versions of the APIs).
Some tactics must be changed to run inside the MSIX container, however. In addition to minimizing work, it facilitates building modern IT ecosystems, deploying apps and updates faster and more frequently and modernizing applications into the new world of containerized packages.
MSIX also supports deploying applications via enterprise tools (e.g., Microsoft Endpoint Manager) or even to the cloud.
Value for Users
By delivering a more streamlined installation experience for users, MSIX offers benefits to customer and end users, including:
- Guaranteed clean installs: This prevents time wasted on installs, uninstalls, reinstalls or issues that occur with other installed applications.
- Isolation between applications except when isolation isn’t desired.
- Greater security to protect the customer and the application.
- Improved features including automatic updates, differential updates and disk space optimization—without having to customize code or the packaging process.
- Single-instance storage; automatic block-level deduplication for any file in any installed package.
- Fewer support calls: This cuts down on annoyances, delays and expenses for all involved.
Elements of a Successful MSIX Project
MSIX projects require a different approach than what many developers are accustomed to. To provide customers with the best package file(s) possible, consider the following elements as part of the project. Doing so will strengthen additional project activities, project setup, testing and debugging and supported schemas.
- Digital signing: Secure installations of MSIX packages are provided by installing the application to the app container and enforcing the app packages with digital signatures (with a valid code signing certificate). Only trusted apps are installed, enforcing the integrity of the package and its container after deployment.
- Package components: An MSIX package includes files that are essentially a set of ingredients—some generated directly (e.g., image files for the start menu) and some created as part of the build process (e.g., output by other vendor tooling). Ingredient files—including root and virtual file system (VFS) folders—will be passed to the MakeAppX command to generate the package.
- An efficient MSIX build process: Custom modifications are sometimes needed for a package, such as when PSF is appropriate for handling a few unexpected scenarios; this requires repackaging extracted contents back into the MSIX package. Whether or not such modifications are required, an efficient build process is always necessary. Building an MSIX/APPX package manually is possible without any packaging tools, with documentation provided by Microsoft. Alternatively, tools such as InstallShield can automate the process.
- MSIX bundles: .msixbundle installation ensures that only packages applicable to a device’s architecture are installed. An MSIX bundle targets different system architectures, language-specific assets, varying image-scale assets or resources applicable to specific devices.
- Modification packages: MSIX supports the creation of modification packages intended to modify or extend existing packages. These allow customers to create customized configurations for your package or enclose a plug-in.
- Shared package containers: When working closely with two separate packages, each with its own start menu and other entry points, a shared package container may be appropriate. This additional XML file may be installed on the end user’s computer to tell the OS that the packages should share a single container rather than be isolated from one another.
- AppInstaller (XML) file: While MSIX and bundle files are generally directly installed into the operating system, the OS facilitates installation and management of updates automatically. Microsoft now makes this functionality available for packages delivered externally by using an AppInstaller XML file to perform the installation, telling the OS where to find the current msix file, where to look for updated AppInstaller files and the configuration of updated settings for the package.
- MSIX core: MSIX Core is built for older Windows versions that don’t natively support MSIX. This enables installation of MSIX apps on previous versions of Windows (as long as the apps are built to work on those versions of Windows).
- Basic AppXManifest structure: Last but not least, the most important file in an MSIX package is the AppXManifest file, an XML file that defines how the application will integrate with the OS for access by the end user, including the application model used that impacts runtime container features. Understanding the structure and element tags (package, properties, resources, dependency capabilities, applications/application element tags) of the AppXManifest early on will help ensure appropriate project setup.
While MSIX continues to evolve, so can your projects. The end results will be application packages that not only streamline work for IT departments but also reduce headaches for end users.