Apr 15 2021 11:40 PM
Apr 15 2021 11:40 PM
Apr 16 2021 02:05 AM
This could happen if your app relies on the current working directory to load/read the other files, or if you are trying to write in any of the files.
If a simple read operation fails, than you might need to specify a custom working directory. By default an app packaged as MSIX is launched with System32 as a working dir. The MSIX packaging tool does not have an option to edit the working dir (from what I know), I recommend you use the free Express edition from Advanced Installer to generate the MSIX package. This tool allows you customize the working directory from its GUI.
If you are getting the error because the application is trying to write in any of those files, then you need to redirect the app (i.e. stop writing in the installation folder - this is not supported by MSIX packaged apps).
If you have the source code of your app and can modify it, I recommend you configure your app to store those files in the AppData user folder.
If you don't have access to the source code then you can use the Package Support Framework (PSF) integration from Advanced Installer to inject a file redirection fixup in your package.
More details - how files redirections work with MSIX and PSF
Disclaimer: I work on the team building Advanced Installer
Apr 18 2021 01:45 PM
While you'd need to debug to be sure, in all likelihood the source code expects the working directory of the process to be the folder that holds the exe file, and the code references the file without and folders.
Traditional installer shortcuts usually will cause the process to start with the working directory of the process to be that folder, but under MSIX -- by default -- start menu launches will set the working directory to be the Windows\System32 folder.
When source code is not available, we usually solve this by adding PsfLauncher from the Package Support Framework. Your package start menu item should point to PsfLauncher, which is then configured to launch your app and set the working directory as you'd like.
With source code access, you can modify your code, either using the executingassembly folder (if .net based) or by adding in the path the to exe in a registry string which the app reads.
Apr 21 2021 09:57 PM