Referring a path with in .ini file present in MSIX package

Copper Contributor

Hi All,

 

I am creating an MSIX package , this package having Config files ( .ini) which Contains path referring some application specific file with in the INSTALLDIR ( VFS\PFx86\abcd\x123\). This Config file is passed as an argument to my Shortcut so the application launches with some Frame and Login screen etc.. . So My question is How this path inside the .ini file should be ? and How can i modify the .ini file for the MSIX package to refer the file correctly . 

The INI file Screen short as below . This INI file is also with in VFS\PFx86\abcd folder . 

INI.JPG Please suggest 

3 Replies
There are two issues here.

1) How to pass an argument on the command line in the shortcut. Microsoft added support for this in the AppXManifest, however the package must be installed on a system with support for the feature, which I think means Windows 11. PsfLauncher may be used for other cases and the argument would be added to the config.json file instead.

2) The file path in the ini file does not need to be modified. As long as the app does read the file, when it tries to reference the path listed this will be redirected automatically to find the copy that is inside the package. Note that this answer applies to only file paths in the ini that are mapped (like program files and the windows folders), but not all file paths are mapped (such as if the file was in the AppData or LocalAppData folder of the package); for those situations you need the Package Support Framework (PSF) either FileRedirectionFixup, or better yet, the MfrFixup.

@TIMOTHY MANGAN  Hi Tim ,

Thank you for the quick replay .  Yes I am doing the PSFLauncher and config.json( Attached the the one i am using ) to pass the arguments .

Config.JPG

So I do not needs to change the path inside the ini file and it automatically redirects to the correct location . is the Config.json file i am using is correct as i see the exe is not taking all the arguments 

 

Please suggest

In the arguments, you list the location of the ini file using a relative path. This would be relative to the current working directory of the launched exe. The Application record in the config.json file should have a workingDirectory field that will dictate what that is. If that field is left blank, then the current working directory will be the same directory that the jade.exe.

Assuming the file is in VFS\\ProgramFilesX86\\JADE\hmlpphe\\c_bin\INIfiles, then you should add the workingDirectory:"" entry.