Inspecting Fixups that are in a Package

Do you want to know if a package uses PSF fixups? Here are a couple of options to inspect it.


The first one is simple, extract the MSIX package using 7-Zip or a similar tool. In the package contents, you should notice the PSF-specific resources (psf launcher, dlls, & the config.json file).


Note. Opening up the package in a zip utility will break the package if saved, so remember to always use a copy of the package!


To understand the exact configuration of the fixups, if present, open the config.json file. Often, this file will be at the root folder of the package, but it could also be stored in the folder with the primary executable (eg. under VFS\ProgramFilesx64\VendorName).


Here is an example:


A Json file that causes the FileRedirectionFixup to be injected into the target process and configures the file redirection for all files with the extension “.log” will look like the one below.


{
    "applications": [
        {
            "id": "PSFLAUNCHER1",
            "executable": "SampleApp/Sample.exe",
            "workingDirectory": "SampleApp/"
        }
    ],
    "processes": [
        {
            "executable": "Sample",
            "fixups": [
                {
                   "dll": "FileRedirectionFixup.dll",
                    "config": {
                        "redirectedPaths": {
                            "packageRelative": [
                                {
                                    "base": "SampleApp/",
                                    "patterns": [
                                        ".*\\.log"
                                    ]
                                }
                            ]
                        }
                    }
                }
            ]
        }
    ]
}

A sample configuration JSON file


The JSON file uses Regular Expression (RegEx) patterns in many of the fields. The flavor used is known as the ECML variety that is also used in JavaScript. So the “.*\\log” in RegEx means a file that starts with anything, but ends with a case sensitive “.log” file extension. Microsoft describes the RegEx language in this documentation.


Another useful tool for inspecting fixups is “MSIX Hero”. This free application informs you about any PSF fixups present in the package. Here is how it looks when inspecting the same MSIX package.


The same sample configuration file - interpreted by MSIX Hero
The same sample configuration file - interpreted by MSIX Hero

For the latest updates on the Package Support Framework, join the Microsoft PSF community.