Forum Discussion
Midhunmn
May 25, 2023Copper Contributor
Referring a path with in .ini file present in MSIX package
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 ...
May 25, 2023
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.
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.
- MidhunmnMay 26, 2023Copper Contributor
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 .
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
- May 26, 2023In 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.