Forum Discussion

andrew1810's avatar
andrew1810
Copper Contributor
Sep 24, 2019

Writing to local registry

I'm looking for a way to allow apps to write to the local registry rather than the virtual one, either via exclusions or a manifest type file (In App-V, I just used to pop an exclusion in the registry)

 

The key will always be the same location for all apps.

 

Any suggestions welcome 🙂

 

Thanks

  • Hi andrew1810,

     

    The default answer is to not disable registry virtualization, of course.  But the full answer is that there's no write virtualization for HKLM writes (those go to the real registry); writes to HKCU are virtualized, but they can be disabled by specifying a manifest property that disables registry virtualization: RegistryWriteVirtualization (https://docs.microsoft.com/en-us/uwp/schemas/appxpackage/uapmanifestschema/element-desktop6-registrywritevirtualization).  This property requires a restricted capability (see link).

     

    Edit: Restricted capabilities, which require approval for Microsoft Store submission and/or are generally only available to Microsoft and certain partners.

     

    -jw

     

     

     

    • alexmarin89's avatar
      alexmarin89
      Iron Contributor

      HiJeffWhiteside . After you add
      RegistryWriteVirtualization and FileSystemWriteVirtualization, when you try to install the MSIX package, indeed these capabilities appear.

      Capabilities:
      "Write registry entries and files that are not cleaned up on uninstall".

       

      However, when you try to install it, you receive the following error "This app package is not supported for installation by App Installer because it uses certain restricted capabilities.".

       

      The xmlns:rescap XML namespace declaration is added in the package manifest.

       

      The only way i got this to install is by running powershell as admin and use add-appxpackage.

       

      Am i missing something?

      • James Pike's avatar
        James Pike
        Icon for Microsoft rankMicrosoft

        Hi alexmarin89 ,

         

        Our policy is currently that AppInstaller does not support installing applications with these restricted capabilities as you observed.

         

        Currently, the work around of using the elevated powershell command is a good option.

         

        Thanks!
        James

Resources