{"id":3497,"date":"2022-12-08T03:08:00","date_gmt":"2022-12-08T08:08:00","guid":{"rendered":"https:\/\/www.tmurgent.com\/TmBlog\/?p=3497"},"modified":"2023-02-06T11:40:08","modified_gmt":"2023-02-06T16:40:08","slug":"new-mfrfixup-for-msix","status":"publish","type":"post","link":"https:\/\/www.tmurgent.com\/TmBlog\/?p=3497","title":{"rendered":"NEW: MfrFixup for MSIX"},"content":{"rendered":"\n\n\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-full wp-image-3499\" src=\"https:\/\/www.tmurgent.com\/TmBlog\/wp-content\/uploads\/2022\/12\/MFR-1.png\" alt=\"\" width=\"1000\" height=\"750\" srcset=\"https:\/\/www.tmurgent.com\/TmBlog\/wp-content\/uploads\/2022\/12\/MFR-1.png 1000w, https:\/\/www.tmurgent.com\/TmBlog\/wp-content\/uploads\/2022\/12\/MFR-1-300x225.png 300w, https:\/\/www.tmurgent.com\/TmBlog\/wp-content\/uploads\/2022\/12\/MFR-1-768x576.png 768w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/>Today I announce the release of v2022-12-5 of the Package Support Framework.\u00a0 While there are numerous fixes to the Launcher and DynamicLibraryFixup, of most importance is the creation of a new fixup.\u00a0 The MfrFixup (Managed File Redirection Fixup) is intended to be a replacement for the File Redirection Fixup.\u00a0 Both fixups remain as part of the PSF so you&#8217;ll have a choice on which one to use (don&#8217;t try both at the same time).<\/p>\n<table style=\"border-collapse: collapse; width: 100%;\">\n<tbody>\n<tr>\n<td style=\"width: 100%;\"><span style=\"font-size: 12px;\"><em>The Package Support Framework (PSF) was originally an open-source project to help Win32\/DotNet applications run when inside an MSIX Container.\u00a0 TMurgent has taken up the support for the PSF in our own fork\u00a0<a href=\"https:\/\/github.com\/TimMangan\/MSIX-PackageSupportFramework\" target=\"_blank\" rel=\"noopener\">here on GitHub<\/a>.<\/em><\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>About the MFR<\/h4>\n<p>The MfrFixup (MFR) was needed because the original architecture of the FileRedirectionFixup (FRF) was too limited.\u00a0 Microsoft&#8217;s original goals for the fixup was to modify the application behavior on a single file (or two) in the application package.\u00a0 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.\u00a0<\/p>\n<p>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.\u00a0 This, along with tooling that applied a &#8220;best practices&#8221; 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.\u00a0 But this summer I reached the conclusion that to increase App Compat more, we needed a better solution.\u00a0<\/p>\n<p>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:<\/p>\n<ul>\n<li>Simple to configure.\u00a0 The default configuration should automatically include the lessons learned and handle most apps.\u00a0 The ability to override this when needed, must also be provided.<\/li>\n<li>Implements Copy-on-Write instead of Copy-on-Access, reducing the overhead of copying files that are never modified.<\/li>\n<li>Supports two styles of redirection. While supporting redirections to the user&#8217;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.\u00a0 This allows an app to be able to create files that may be later used by other apps (like to email out that document).<\/li>\n<li>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 &#8220;do the right thing&#8221; no matter which one the app requests on this call.<\/li>\n<\/ul>\n<p>The architecture is also set up to be able to co-exist with the <a href=\"https:\/\/www.tmurgent.com\/TmBlog\/?p=3491\" target=\"_blank\" rel=\"noopener\">InstalledLocationVirtualization<\/a> extension that I now recommend for most packages.\u00a0 These technologies overlap in what they do, but neither provides 100% of what we need.\u00a0 In many cases, you will need both in your package.\u00a0 The ILV white paper includes this chart to summarize:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-full wp-image-3495\" src=\"https:\/\/www.tmurgent.com\/TmBlog\/wp-content\/uploads\/2022\/12\/ILV_Testing.png\" alt=\"\" width=\"632\" height=\"128\" srcset=\"https:\/\/www.tmurgent.com\/TmBlog\/wp-content\/uploads\/2022\/12\/ILV_Testing.png 632w, https:\/\/www.tmurgent.com\/TmBlog\/wp-content\/uploads\/2022\/12\/ILV_Testing-300x61.png 300w\" sizes=\"auto, (max-width: 632px) 100vw, 632px\" \/><\/p>\n<p>\u00a0<\/p>\n<p>\u00a0<\/p>\n<p>\u00a0<\/p>\n<p>But there is a risk of conflict between either the FRF or MFR when used with ILV.\u00a0 Early testing indicates that any conflicts should be rare, but it is reasonable to assume there will be some.\u00a0 Additionally, there are shortcuts that the MFR can take if it knows that InstalledLocationVirtualization is also in use.\u00a0 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.<\/p>\n<p>More information on the MFR is in the ReadMe file: <a href=\"https:\/\/github.com\/TimMangan\/MSIX-PackageSupportFramework\/blob\/develop\/fixups\/MFRFixup\/readme.md\" target=\"_blank\" rel=\"noopener\">https:\/\/github.com\/TimMangan\/MSIX-PackageSupportFramework\/blob\/develop\/fixups\/MFRFixup\/readme.md<\/a><\/p>\n<h4>PSF overall release<\/h4>\n<p>The release information for v2022-12-5 of the PSF may be found at this link: <a href=\"https:\/\/github.com\/TimMangan\/MSIX-PackageSupportFramework\/releases\/tag\/v2022.12.05\" target=\"_blank\" rel=\"noopener\">https:\/\/github.com\/TimMangan\/MSIX-PackageSupportFramework\/releases\/tag\/v2022.12.05<\/a><\/p>\n<p>Release notes include:<\/p>\n<ul>\n<li>Created new Managed File Redirection Fixup (MFRFixup) as a potential replacement for FileRedirectionFixup.<\/li>\n<li>Fix issue in DynamicLibraryFixup with certain mixes of bitness.<\/li>\n<li>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; &#8220;\\VFS&#8230;&#8221; means they really wanted &#8220;VFS&#8230;&#8221;<\/li>\n<li>Support (by ignoring) the shell file references in FRF\/MFR, i.e. shell::{guid} or just ::{guid} used in older file picker dialogs.<\/li>\n<li>Support (by ignoring) for the old-style DOS special objects in FRF\/MFR, e.g COM4: or LPT2: or CONOUT$<\/li>\n<li>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.<\/li>\n<li>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.<\/li>\n<li>Fix argument virtualization for 32-bit launcher.<\/li>\n<li>Added MFR configuration overrides.<\/li>\n<\/ul>\n<h4>Other software using this release<\/h4>\n<p>Releases of my tooling using this release should come out soon.\u00a0 Look for:<\/p>\n<ul>\n<li>Version 3.0 of TMEditX<\/li>\n<li>Version 6.0 of PsfTooling<\/li>\n<\/ul>\n<p>For other tooling vendors, check with their websites.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Today I announce the release of v2022-12-5 of the Package Support Framework.\u00a0 While there are numerous fixes to the Launcher and DynamicLibraryFixup, of most importance is the creation of a new fixup.\u00a0 The MfrFixup (Managed File Redirection Fixup) is intended to be a replacement for the File Redirection Fixup.\u00a0 Both fixups remain as part of&hellip; <a class=\"more-link\" href=\"https:\/\/www.tmurgent.com\/TmBlog\/?p=3497\">Continue reading <span class=\"screen-reader-text\">NEW: MfrFixup for MSIX<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_crdt_document":"","_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"footnotes":""},"categories":[57,56],"tags":[52,54],"class_list":["post-3497","post","type-post","status-publish","format-standard","hentry","category-packaging","category-psf","tag-msix","tag-psf","entry"],"_links":{"self":[{"href":"https:\/\/www.tmurgent.com\/TmBlog\/index.php?rest_route=\/wp\/v2\/posts\/3497","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.tmurgent.com\/TmBlog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tmurgent.com\/TmBlog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tmurgent.com\/TmBlog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tmurgent.com\/TmBlog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3497"}],"version-history":[{"count":6,"href":"https:\/\/www.tmurgent.com\/TmBlog\/index.php?rest_route=\/wp\/v2\/posts\/3497\/revisions"}],"predecessor-version":[{"id":3505,"href":"https:\/\/www.tmurgent.com\/TmBlog\/index.php?rest_route=\/wp\/v2\/posts\/3497\/revisions\/3505"}],"wp:attachment":[{"href":"https:\/\/www.tmurgent.com\/TmBlog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3497"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tmurgent.com\/TmBlog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3497"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tmurgent.com\/TmBlog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3497"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}