How can i validate/verify modification package's registry customization?

Copper Contributor

Hello there,

 

I was exploring modification packages with respect to file customization as well registry customization.

I could make samples for file customization with file existence scenario,but just wondering how can i make samples for registry customization.

My expectation was:

  • Add key say HKCU\Software\Sample\Key1 in Mainpackage registry 
  • Add sample application which can read registry key-value existence in the above mentioned path
  • Create a modification package with a value for Key1 key 
  • On running package, key existence message should come from the sample application(It is written in that way)
  • Since writing of registry key would be private per-user,per-app i couldn't see this value been written to system's HKCU native hive.
  • Just curious how to validate that part?
  • Is that the only way i.e reading the current directory's User.dat/UserClass.dat and check the key existence?
  • One more question:from this link https://docs.microsoft.com/en-us/windows/msix/desktop/desktop-to-uwp-behind-the-scenes#registry 

"

Only keys under HKLM\Software are part of the package; keys under HKCU or other parts of the registry are not. Writes to keys or values in the package are not allowed. Writes to keys or values not part of the package are allowed as long as the user has permission.

All writes under HKCU are copy-on-written to a private per-user, per-app location. Traditionally, uninstallers are unable to clean HKEY_CURRENT_USER because the registry data for logged out users is unmounted and unavailable."

  • Can you please elaborate a bit?,Can i write entries to HKLM too in modification package?
  • "Writes to keys or values not part of the package are allowed as long as the user has permission." what does this exactly mean?

Thanks,

Jenifer

1 Reply

@Jenifer Rajendren, a great resource is this article here https://docs.microsoft.com/en-us/windows/msix/manage/troubleshoot-msix-container

 

It walks through how you can troubleshoot runtime issues occurring in a MSIX container, which include the registry.