A little background. Up until now, our app has run as a process inside the user session. It stores some configuration in the registry accessible via HKEY_CURRENT_USER.
When re-developing the app as a service, I am attempting to access the same configuration data through HKEY_USERS. I know the registry identity of the user, so it is possible for me to build a 'correct path' to that registry location.
But, I am finding that when the service is starting up, it is unable to read from the registry.
If I start the "service" as a plain-old process inside my session, it is able to read from the HKEY_USERS registry.
Question: Is this feasible? Should I be able to do this? access the registry via HKEY_USERS? And, is there any additional security I need to implement to get access to this stuff?
Or, should I do some sort of impersonation? I think I'd like to avoid this, but it's starting to feel necessary.
Additionally, if I wanted to move the configuration to an accessible place, how might I accomplish this? (maybe impersonation would be used to do this?)
Guide me please!