NEW: MfrFixup for MSIX

Today I announce the release of v2022-12-5 of the Package Support Framework.  While there are numerous fixes to the Launcher and DynamicLibraryFixup, of most importance is the creation of a new fixup.  The MfrFixup (Managed File Redirection Fixup) is intended to be a replacement for the File Redirection Fixup.  Both fixups remain as part of the PSF so you’ll have a choice on which one to use (don’t try both at the same time).

The Package Support Framework (PSF) was originally an open-source project to help Win32/DotNet applications run when inside an MSIX Container.  TMurgent has taken up the support for the PSF in our own fork here on GitHub.

About the MFR

The MfrFixup (MFR) was needed because the original architecture of the FileRedirectionFixup (FRF) was too limited.  Microsoft’s original goals for the fixup was to modify the application behavior on a single file (or two) in the application package.  While this might meet the needs of a developer that knows their code and can run a source code debugger on it, it was difficult for IT Pros to use and severely lacking in the coverages that we needed. 

Over the last few years I have patched additional capabilities that were left out of the original design, and added in patches for specific kinds of application activities.  This, along with tooling that applied a “best practices” like configuration to the difficult configuration file, allowed us to increase the percentage of existing applications that IT Pros could repackage successfully into MSIX considerably.  But this summer I reached the conclusion that to increase App Compat more, we needed a better solution. 

So I took on the task of creating a brand new fixup. One with an architecture that learned from the lessons of the last four years and was built to meet the needs of the IT Pro:

  • Simple to configure.  The default configuration should automatically include the lessons learned and handle most apps.  The ability to override this when needed, must also be provided.
  • Implements Copy-on-Write instead of Copy-on-Access, reducing the overhead of copying files that are never modified.
  • Supports two styles of redirection. While supporting redirections to the user’s local profile (just like the FRF), we also need a redirection-to-native option, for folders like the Documents or Desktop folders, even when the package includes files there themselves.  This allows an app to be able to create files that may be later used by other apps (like to email out that document).
  • Assumes that apps might get confused about which folder to use due to previous calls that were redirected (native, package, or redirected path) and actively try to “do the right thing” no matter which one the app requests on this call.

The architecture is also set up to be able to co-exist with the InstalledLocationVirtualization extension that I now recommend for most packages.  These technologies overlap in what they do, but neither provides 100% of what we need.  In many cases, you will need both in your package.  The ILV white paper includes this chart to summarize:

 

 

 

But there is a risk of conflict between either the FRF or MFR when used with ILV.  Early testing indicates that any conflicts should be rare, but it is reasonable to assume there will be some.  Additionally, there are shortcuts that the MFR can take if it knows that InstalledLocationVirtualization is also in use.  So over time the MFR will have an IlvAware mode setting (this setting is defined in the Json but is not active in the code at this time) that should make it safe to add both capabilities to all your packages as we get more experience.

More information on the MFR is in the ReadMe file: https://github.com/TimMangan/MSIX-PackageSupportFramework/blob/develop/fixups/MFRFixup/readme.md

PSF overall release

The release information for v2022-12-5 of the PSF may be found at this link: https://github.com/TimMangan/MSIX-PackageSupportFramework/releases/tag/v2022.12.05

Release notes include:

  • Created new Managed File Redirection Fixup (MFRFixup) as a potential replacement for FileRedirectionFixup.
  • Fix issue in DynamicLibraryFixup with certain mixes of bitness.
  • Fix to handle a mistake commonly made in manual editing of the json file for the exe and working directory of the application record in the config.json; “\VFS…” means they really wanted “VFS…”
  • Support (by ignoring) the shell file references in FRF/MFR, i.e. shell::{guid} or just ::{guid} used in older file picker dialogs.
  • Support (by ignoring) for the old-style DOS special objects in FRF/MFR, e.g COM4: or LPT2: or CONOUT$
  • Alter FRF/MFR attempts to open a native directory to list files to open the native directory. Not an ideal solution, but better than going to the redirection area.
  • Add intercepts of ShellExecute and ShellExecuteEx for debugging purposes without changes. This will help us to understand if we need to modify behaviors in these APIs.
  • Fix argument virtualization for 32-bit launcher.
  • Added MFR configuration overrides.

Other software using this release

Releases of my tooling using this release should come out soon.  Look for:

  • Version 3.0 of TMEditX
  • Version 6.0 of PsfTooling

For other tooling vendors, check with their websites.

By Tim Mangan

Tim is a Microsoft MVP, and a Citrix CTP Fellow. He is an expert in App-V and MSIX.