-
Notifications
You must be signed in to change notification settings - Fork 3
Config.Json
The config.json
file is a single file that is added to a PSF enabled package to configure all of the PSF components in the package.
While an XML file may have been more conventional for this kind of purpose, Microsoft decided to use a json formatted file. After criticism, Microsoft introduced an alternative XML format and converter from the XML form to json. However, the PSF components in the package only understand the json form so the use of the XML seems to be limited to third-party developers that prefer XML and perform the conversion before writing into packages. As the converter has not been maintained since originally provided, it is up to those third-party developers to keep their own conversions up-to-date.
Many of the values in the json file utilize a RegEx pattern syntax which might be unfamiliar to many. This syntax is often confusing to those not used to working with it and they may incorrectly assume it is standard cmd shell wildcard syntaxes in use. There are several flavors of regex defined, and the PSF utilizes the ECML (aka javaScript) flavor of the syntax. While the flavors are generally quite close, each flavor has quirks and you need to be sure to use the right flavor. The website RegEx101 is an excellent site to test a regex pattern against potential input strings. The site will not only let you know what matches occur against your input strings, it will also help you to understand the meaning of your test pattern.
The config.json
file consists of two high level entries, applications
and processes
. Each consist of arrays.
The applications' entry is an array of
applicationvalues. T he PsfLauncher processes (via PsfRuntime) use these values to find an application entry that matches the Id of their application. This matching is not done by using the name of the PsfLauncher process, but instead of the AppID of the process running in the container. This AppID is referenced in the AppXManifest file of the package as the
Id` of an application entry of the manifest.
For more information on how the launcher locates and interprets this configuration, see the wiki documentation on PsfLauncher.
The processes
entry is an array of process
values.
The copy of PsfRuntime dll injected into processes in the container reads the processes
section looking for the first match to the process
running.
This process
value will consist of an entry called fixups
. The value of fixups
will be an array of fixups and their configurations.
The wiki page PsfRuntime Dll and PsfRunDll Exe provides more detail on how this is read, but individual fixups have their own wiki pages which should be consulted.