Forum Discussion

KalpeshParmar's avatar
KalpeshParmar
Copper Contributor
Jun 05, 2023

how to access write permission for derby.log file on windows app location where msix file installed.

I install the exe file and after login success.

Location where our EXE Format File is getting installed : " C:/Program Files "

 

In Order to upload on Microsoft Store we are converting our app into "MSIX" format from that EXE.
We are getting "Login Error".

 

We are using Apache Derby Database for our Application.
As when we run application, it generates one file named "derby.log", which is necessary to provide rights to Admin/user to Logged In.
but Windows App (which is default location for all windows applications) doesn't provide permission to generate and create "derby.log" file.
So, kindly guide us that how we can provide rights to user in Windows App.
Location where our MSIX Format File is getting installed : " C:/Program Files/Windows App ".

5 Replies

  • I think that you will need to reach out to whomever created the package. It looks like they need to address the issue.
    • Kashyap_Pandya's avatar
      Kashyap_Pandya
      Copper Contributor

      TIMOTHY_MANGAN 

      We have created the package and we are trying to take help from Microsoft Store for login issue because it throw error while we are converting.exe to msix format of ms store.

       

      • TIMOTHY_MANGAN's avatar
        TIMOTHY_MANGAN
        MVP

        Kashyap_Pandya 

        Files contained in the package are by default immuntable and may not be written to by default. Adding new files to such paths is also a problem. To solve this, you'd want to do one of the following:

        • In the AppXManifest.xml file, add the package level extension uap10:InstalledLocationVirtualization - Windows UWP applications | Microsoft Learn (Note: You must also ensure that the root element of the file contains the xmlns:uap10 schema reference and is marked ignorable).  If you need help sleeping at night, the gory details on this feature are written about in my white paper MSIX InstalledLocationVirtualization (tmurgent.com).  This method works as long as files are not under the VFS folders, or are under the VFS\ProgramFilesX?? folder, VFS\Windows folder, or VFS\Common Appdata folder only.
        • Add the Package Support Framework (PSF) with PsfLauncher, PsfRuntime, a config.json file, and either the FileRedirectionFixup or newer MFRFixup.  This works no matter where files are in the package, and can solve additional challenges that your code may have when running under MSIX runtime.  The most recent versions of these tools may be found on my fork of the PSF MSIX InstalledLocationVirtualization (tmurgent.com) with documentation on the wiki page there also. The Release has prebuilt 32/64 bit components so that you don't have to build it from source unless you want to.  I also co-authored a book for developers on making MSIX packages you can obtain for free from Revenera (the InstallShield folks) here A Developer’s Guide to MSIX (revenera.com)  Microsoft has there own foks and even a nuget package, however my fork as almost two years of additional improvements.
        • Change your code to always use locations outside of the package, such as under the user's AppData or LocalAppData folder.

Resources