TerryB
November 17th, 2003, 06:10 AM
I'm trying to start a DCOM server. The first thing this does is to read some configuration data from the registry using RegOpenKeyEx. I want to be able to start this both manually from an icon, and from a service when the machine starts.
When I start the server from a manual 'kick-start' program it's fine.
When I try to start from a service it fails. RegOpenKeyEx returns 2, which appears to be 'file not found'.
We've put our keys in both the HKEY_LOCAL_MACHINE and HKEY_CURRENT_USER sections of the registry, and get the same result.
I presume that the service is running in some sort of user role which cannot access the registry?
Does anyone know where keys should be placed to be read from a service started program?
When I start the server from a manual 'kick-start' program it's fine.
When I try to start from a service it fails. RegOpenKeyEx returns 2, which appears to be 'file not found'.
We've put our keys in both the HKEY_LOCAL_MACHINE and HKEY_CURRENT_USER sections of the registry, and get the same result.
I presume that the service is running in some sort of user role which cannot access the registry?
Does anyone know where keys should be placed to be read from a service started program?