locked
Accessing Registry

    Question

  • Well, I have come across some posts reagrding access to registry from Metro app. I also came to know that Metro apps cannot access registry.Actually we are converting an existing Desktop app to Metro.From amy app I have to read from .write to reagitry in severla places. For example, to read a GUID from HKEYLocalMachine\Software\SomeSoftWare. Regarding this, I came accross a post that suggests to store user settings in a local file and access via a WCF web service. In my case, it is not user setting that I am accessing. These are details about installed software which the existing app reads from registry itself. How can this be done from Metro apps? I think Metro apps should be allowed access to resgitry to solve porting/conversion issues like this. Especially when the existing app depends heavily on reistry access. Can someone please suggest a solution? This  is a main concern in my app.
    Tuesday, April 10, 2012 5:54 AM

Answers

  • Metro style apps are intended to be self contained. They cannot access the registry, cannot access the file system outside of the apps own isolated data store, and cannot interact with other processes on the system (except via contracts). The post suggesting connecting back to the local system with WCF was incorrect.

    If your app requires a lot of registry access and information about other applications on the system then it would be better off as a desktop app than as a Metro style app, since Metro style apps cannot access that data.

    --Rob

    Tuesday, April 10, 2012 11:27 PM
    Owner

All replies

  • Or is it possible to read the same stuff we read from regstry from some other location/files etc? I understand resgitry is a database and the information that are displayed in registry should be somewhere in some files/locations, right? I suppose registry is built around some concepts like "hives". If we are able to access such location from Metro apps that would suffice. Any info?
    Tuesday, April 10, 2012 6:03 AM
  • Metro style apps are intended to be self contained. They cannot access the registry, cannot access the file system outside of the apps own isolated data store, and cannot interact with other processes on the system (except via contracts). The post suggesting connecting back to the local system with WCF was incorrect.

    If your app requires a lot of registry access and information about other applications on the system then it would be better off as a desktop app than as a Metro style app, since Metro style apps cannot access that data.

    --Rob

    Tuesday, April 10, 2012 11:27 PM
    Owner