SOLVED

MSIX Packaging Tool and Registry User.Dat and UserClasses.Dat files

%3CLINGO-SUB%20id%3D%22lingo-sub-1606597%22%20slang%3D%22en-US%22%3EMSIX%20Packaging%20Tool%20and%20Registry%20User.Dat%20and%20UserClasses.Dat%20files%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1606597%22%20slang%3D%22en-US%22%3E%3CP%3EWhen%20using%20the%20Microsoft%20MSIX%20Packaging%20Tool%20to%20perform%20a%20capture%2C%20if%20no%20modifications%20are%20captured%20to%20the%20current%20user's%20Software%2FClasses%20key%2C%20the%20captured%20files%20include%20only%20a%20Registry.Dat%20file%2C%20and%20the%20User.Dat%20AND%20UserClasses.Dat%20files%20are%20not%20present.%26nbsp%3B%20I%20am%20using%20version%202020.709%20but%20believe%20that%20this%20capture%20form%20is%20not%20necessarily%20new%20in%20this%20version.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EI%20believe%20that%20this%20is%20causing%20issues%20when%20testing%20the%20package%2C%20causing%20the%20app%20to%20not%20see%20all%20registry%20settings%20located%20in%20the%20Registry.Dat%20file.%26nbsp%3B%20Tests%20are%20currently%20being%20run%20on%20Windows%2010%202004%20(build%2019041.450)%20with%20August%202020%20updates%20(KB4566782%20and%20KB456945%20and%20KB4570334).%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EInitially%2C%20I%20thought%20the%20problem%20was%20only%20with%20HKLM%20keys%2C%20but%20I%20now%20believe%20there%20may%20be%20issues%20with%20HKCU%20keys%20also.%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EYou%20can%20contact%20me%20for%20two%20(mostly)%20identical%20packages%20to%20show%20the%20problem.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E(There%20may%20also%20be%20an%20unrelated%20issue%20with%20HKLM%5CSystem%20registry%20items%20not%20being%20seen%20while%20HKLM%5CSoftware%20is%20seen.%26nbsp%3B%20I%20am%20continuing%20to%20investigate%20that%20as%20a%20potential%20second%20issue%20that%20may%20be%20unrelated%20to%20the%20capture%20form.)%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1762960%22%20slang%3D%22en-US%22%3EMy%20Re%3A%20MSIX%20Packaging%20Tool%20and%20Registry%20User.Dat%20and%20UserClasses.Dat%20files%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1762960%22%20slang%3D%22en-US%22%3E%3CP%3E%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%3C%2FP%3E%3CP%3EMy%20modification%20packages%20created%20on%20Windows%2010%202004%20(with%20changed%20HKCU%20content)%20do%20not%20contain%26nbsp%3B%3CSPAN%3EUser.Dat%20AND%20UserClasses.Dat.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EThey%20do%20not%20work.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EOn%201909%20it%20was%20still%20working%20(User.Dat%20AND%20UserClasses.Dat%20were%20created%20and%20are%20in%20the%20modification%20package)%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1763367%22%20slang%3D%22en-US%22%3ERe%3A%20My%20Re%3A%20MSIX%20Packaging%20Tool%20and%20Registry%20User.Dat%20and%20UserClasses.Dat%20files%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1763367%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F825991%22%20target%3D%22_blank%22%3E%40dilorenzo%3C%2FA%3E%26nbsp%3B%20%26nbsp%3BI'm%20adding%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F145112%22%20target%3D%22_blank%22%3E%40Sharla%20Akers%3C%2FA%3E%26nbsp%3B%20reference%20to%20this%20to%20bring%20it%20to%20attention.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIf%20you%20are%20correct%20in%20your%20supposition%2C%20you%20could%20try%20the%20following.%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EI%20have%20noticed%20that%20the%20User.Dat%20and%20UserClasses.Dat%20files%20are%20not%20generated%20in%20the%20package%20in%20later%20versions%20of%20the%20Microsoft%20MXIX%20Packaging%20Tool%20unless%20the%20capture%20ingredients%20include%20at%20least%20one%20entry%20under%20HKCU%5CSoftware%5CClasses%20(even%20if%20there%20are%20other%20HKCU%20based%20entries).%26nbsp%3B%20So%20I%20have%20been%20adding%20a%20%22HKCU%5CSoftware%5CClasses%5CNonExistent%22%20reg%20key%20into%20the%20packages.%26nbsp%3B%20I%20can't%20remember%20what%20I%20noticed%20not%20working%2C%20but%20this%20solved%20that%20problem%20for%20me%20and%20perhaps%20it%20is%20what%20you%20need.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EFYI%3A%20The%20user.dat%20file%20appears%20to%20contain%20the%20complete%20application%20hive%20and%20these%20two%20extra%20files%20appear%20to%20contain%20a%20copy%20of%20subsets.%26nbsp%3B%20I%20am%20unsure%20of%20their%20use%2C%20but%20it%20would%20seem%20that%20portions%20of%20the%20system%20that%20only%20require%20a%20subset%20can%20use%20these%20for%20expediency.%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1766379%22%20slang%3D%22en-US%22%3ERe%3A%20My%20Re%3A%20MSIX%20Packaging%20Tool%20and%20Registry%20User.Dat%20and%20UserClasses.Dat%20files%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1766379%22%20slang%3D%22en-US%22%3E%3CP%3E%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%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThank%20you%20for%20reporting%20this.%20In%20the%20future%2C%20the%20MSIX%20Packaging%20Tool%20will%20ensure%20User.dat%20gets%20created%20even%20if%20there%20are%20no%20changes%20to%20HKCU%5CSoftware%5CClasses.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIn%20the%20meantime%2C%20as%20you%20said%2C%20you%20can%20create%20an%20extra%20registry%20key%20under%20HKCU%5CSoftware%5CClasses%20to%20ensure%20User.dat%20is%20created.%3C%2FP%3E%3C%2FLINGO-BODY%3E
MVP

When using the Microsoft MSIX Packaging Tool to perform a capture, if no modifications are captured to the current user's Software/Classes key, the captured files include only a Registry.Dat file, and the User.Dat AND UserClasses.Dat files are not present.  I am using version 2020.709 but believe that this capture form is not necessarily new in this version.

 

I believe that this is causing issues when testing the package, causing the app to not see all registry settings located in the Registry.Dat file.  Tests are currently being run on Windows 10 2004 (build 19041.450) with August 2020 updates (KB4566782 and KB456945 and KB4570334).

 

Initially, I thought the problem was only with HKLM keys, but I now believe there may be issues with HKCU keys also. 

 

You can contact me for two (mostly) identical packages to show the problem.

 

(There may also be an unrelated issue with HKLM\System registry items not being seen while HKLM\Software is seen.  I am continuing to investigate that as a potential second issue that may be unrelated to the capture form.)

3 Replies

@TIMOTHY MANGAN 

My modification packages created on Windows 10 2004 (with changed HKCU content) do not contain User.Dat AND UserClasses.Dat.

They do not work.

On 1909 it was still working (User.Dat AND UserClasses.Dat were created and are in the modification package)

@dilorenzo   I'm adding @Sharla Akers  reference to this to bring it to attention.

 

If you are correct in your supposition, you could try the following. 

 

I have noticed that the User.Dat and UserClasses.Dat files are not generated in the package in later versions of the Microsoft MXIX Packaging Tool unless the capture ingredients include at least one entry under HKCU\Software\Classes (even if there are other HKCU based entries).  So I have been adding a "HKCU\Software\Classes\NonExistent" reg key into the packages.  I can't remember what I noticed not working, but this solved that problem for me and perhaps it is what you need.

 

FYI: The user.dat file appears to contain the complete application hive and these two extra files appear to contain a copy of subsets.  I am unsure of their use, but it would seem that portions of the system that only require a subset can use these for expediency.  

Best Response confirmed by TIMOTHY MANGAN (MVP)
Solution

@TIMOTHY MANGAN 

 

Thank you for reporting this. In the future, the MSIX Packaging Tool will ensure User.dat gets created even if there are no changes to HKCU\Software\Classes.

 

In the meantime, as you said, you can create an extra registry key under HKCU\Software\Classes to ensure User.dat is created.