Forum Discussion

Anonymous's avatar
Anonymous
Feb 19, 2019
Solved

Application does not launch post installation

Hello Team, We are currently packaging "KeePass" application (https://keepass.info/download.html) to MSIX format. The app appears to be of simple complexity, few files in Program Files (x86)\Appfold...
  • JeffWhiteside's avatar
    JeffWhiteside
    Feb 22, 2019

    Hi Chetan,  I'm not sure about why the '_' underscore affects anything (it shouldn't).  Launching via the the Start Menu ("Tile Launch") is the way to have the app be 'containerized' when it's launched (this is failing today).  Launching via double-clicking the .exe file does not launch the app in the container (this is working today).  Maybe removing the '_' is subverting the container during launch.

     

    I'm looking at the trace you attached in the package above - and I see an attempt to load Application.ini.

     

    9:41:20.6583378 AM KeePass.exe 8936 CreateFile C:\Program Files\WindowsApps\KeePass_2.41.0.0_x64__a5f717c3cttz4\VFS\ProgramFilesX86\KeePass2x\Application.ini REPARSE Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Created

     

     

    Since you mentioned KeePass is open source, I took a look.   It looks like the CommonInit() function is doing this check,

     

            public static bool CommonInit()
            {
                m_bDesignMode = false; // Again, for the ones not calling Main

                m_rndGlobal = CryptoRandom.NewWeakRandom();

                InitEnvSecurity();
                MonoWorkarounds.Initialize();

                // try { NativeMethods.SetProcessDPIAware(); }
                // catch(Exception) { }

                // Do not run as AppX, because of compatibility problems
                // (unless we're a special compatibility build)
                if(WinUtil.IsAppX && !IsBuildType(
                    "CDE75CF0D4CA04D577A5A2E6BF5D19BFD5DDBBCF89D340FBBB0E4592C04496F1"))
                    return false;

     

    https://github.com/dlech/KeePass2.x/blob/6b1160ff4d1b042bf7e59bb8c2e9f0a189a35c4d/KeePass/Program.cs

     

    This comment "Do not run as AppX, because of compatibility problems" and the WinUtil.IsAppX are suspicious.  Seems like like there's code in KeePass.exe to specifically stop it running in the msix container.

     

     

Resources