MSIX - Application HKCU RegKey

%3CLINGO-SUB%20id%3D%22lingo-sub-1449565%22%20slang%3D%22en-US%22%3EMSIX%20-%20Application%20HKCU%20RegKey%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1449565%22%20slang%3D%22en-US%22%3E%3CP%3EI%20have%20created%20MSIX%20for%20EditPlus%203.50%3B%20Eula%20Agreement%20%26amp%3B%20License%20have%20been%20captured%20in%20HKCU%20keys%20and%20all%20the%20keys%20were%20captured%20in%20MSIX%20package.%3C%2FP%3E%3CP%3EWhile%20I%20install%20the%20MSIX%20application%20%2C%20app%20is%20not%20able%20to%20read%20the%20reg%20keys%20which%20are%20located%20in%20registry.dat.%3C%2FP%3E%3CP%3EAfter%20launching%20MSIX%20application%2C%20registry.dat%20will%20be%20merged%20virtually%20with%20Physical%20registry%20and%20application%20can%20see%20the%20registry%20keys%20which%20are%20captured%20in%20registry.dat.%20But%20I%20am%20not%20able%20to%20see%20this%20behavior%20when%20I%20packaged%20EditPlus%20MSIX.%20Application%20is%20prompting%20for%20serial%20key%20again%20.%20Any%20suggestions%2C%20please%20share%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20using%20Hover%20(Advanced%20Installer)%20to%20identify%20if%20the%20registry%20keys%20were%20merged%20virtually%20or%20not%20after%20the%20launching%20application%20and%20I%20see%20that%20keys%20were%20merged%20with%20physical%20registry%20after%20launching%20the%20application.%20Screenshots%20were%20attached%20to%20this%20post.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1450448%22%20slang%3D%22en-US%22%3ERe%3A%20MSIX%20-%20Application%20HKCU%20RegKey%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1450448%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F511139%22%20target%3D%22_blank%22%3E%40vpanchumarthi%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThis%20sounds%20like%20a%20permissions%20problem.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EOther%20apps%20experience%20a%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fpackage-support-framework%2Fproposal-for-registrylegacyfixups%2Fm-p%2F1427153%22%20target%3D%22_blank%22%3Esimilar%20problem%3C%2FA%3E%2C%20as%20explained%20by%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F146612%22%20target%3D%22_blank%22%3E%40TIMOTHY%20MANGAN%3C%2FA%3E.%26nbsp%3B%20Below%20is%20an%20excerpt%20from%20Tim's%20issues.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ETLDR%3A%20If%20you%20still%20maintain%20the%20code%20for%20your%20app%20make%20sure%20you%20try%20to%20open%20the%20registry%20requiring%20%22READ_WRITE%22%20and%20not%20%22FULL_ACCESS%22.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIf%20you%20don't%20have%20access%20to%20the%20code%20you%20need%20PSF%2C%20reach%20out%20to%20Tim%2C%20based%20on%20the%20linked%20post%2C%20it%20seems%20that%20he%20is%20working%20on%20a%20fixup%20for%20this%20issue.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CEM%3EThe%20app%20opens%20it's%20registry%20keys%20located%20under%20HKCU%20by%20opening%20the%20key%20requesting%20%22FULL_ACCESS%22%20(aka%20%22STANDARD_RIGHTS_ALL%22)%2C%20although%20it%20only%20requires%20%22READ_WRITE%22.%20This%20can%20happen%20because%20developers%20sometimes%20copy%2Fpaste%20the%20sample%20code%20written%20in%20Microsoft%20documentation%20without%20fully%20thinking%20about%20what%20they%20really%20need.%3C%2FEM%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CEM%3EThe%20app%20functions%20correctly%20when%20installed%20natively%20on%20the%20latest%20Windows%2010%20builds%20when%20using%20the%20MSI%20installer.%20This%20is%20because%20there%20is%20no%20issue%20in%20giving%20the%20app%20full%20access%20to%20the%20vendor%20HKCU%20based%20key%2C%20and%20even%20if%20it%20deleted%20the%20key%20or%20sub-elements%20it%20would%20only%20harm%20this%20app.%3C%2FEM%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CEM%3EUnder%20MSIX%20on%20certain%20operating%20systems%20(1903%20and%20below)%2C%20these%20permissions%20upon%20opening%20a%20key%20that%20is%20part%20of%20the%20package%20is%20not%20supported%2C%20even%20when%20under%20HKCU.%20So%20currently%20the%20MSIX%20runtime%20responds%20to%20this%20request%20with%20ACCESS_DENIED%20which%20breaks%20the%20app%20as%20the%20developer%20never%20experienced%20that%20call%20failing%20and%20does%20not%20handle%20the%20failure.%3C%2FEM%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E
New Contributor

I have created MSIX for EditPlus 3.50; Eula Agreement & License have been captured in HKCU keys and all the keys were captured in MSIX package.

While I install the MSIX application , app is not able to read the reg keys which are located in registry.dat.

After launching MSIX application, registry.dat will be merged virtually with Physical registry and application can see the registry keys which are captured in registry.dat. But I am not able to see this behavior when I packaged EditPlus MSIX. Application is prompting for serial key again . Any suggestions, please share

 

I am using Hover (Advanced Installer) to identify if the registry keys were merged virtually or not after the launching application and I see that keys were merged with physical registry after launching the application. Screenshots were attached to this post.

1 Reply

Hi @vpanchumarthi 

 

This sounds like a permissions problem.

 

Other apps experience a similar problem, as explained by @TIMOTHY MANGAN.  Below is an excerpt from Tim's issues.

 

TLDR: If you still maintain the code for your app make sure you try to open the registry requiring "READ_WRITE" and not "FULL_ACCESS".

 

If you don't have access to the code you need PSF, reach out to Tim, based on the linked post, it seems that he is working on a fixup for this issue.

 

 

The app opens it's registry keys located under HKCU by opening the key requesting "FULL_ACCESS" (aka "STANDARD_RIGHTS_ALL"), although it only requires "READ_WRITE". This can happen because developers sometimes copy/paste the sample code written in Microsoft documentation without fully thinking about what they really need.

 

The app functions correctly when installed natively on the latest Windows 10 builds when using the MSI installer. This is because there is no issue in giving the app full access to the vendor HKCU based key, and even if it deleted the key or sub-elements it would only harm this app.

 

Under MSIX on certain operating systems (1903 and below), these permissions upon opening a key that is part of the package is not supported, even when under HKCU. So currently the MSIX runtime responds to this request with ACCESS_DENIED which breaks the app as the developer never experienced that call failing and does not handle the failure.