Subject | RE: [IBO] off-top: Reading registry entries in win 2000 with serv ice |
---|---|
Author | Christian Gütter |
Post date | 2001-03-05T16:19:57Z |
Hui Luiz,
I guess you should try to store your registry keys in
'HKEY_LOCAL_MACHINE' (property 'Rootkey' of TRegIniFile).
Services run out of user context, so for a service, a HKEY_LOCAL_USER
does not exist.
This is also why you are able to read the key when you run the service
with a user account.
HTH,
Christian
> If I run the service into a user account, I can read from register.This is all IMHO:
>
> Does someone has a sample about how read windows registry in
> a service start
> up, when it's runnning as local system account?
I guess you should try to store your registry keys in
'HKEY_LOCAL_MACHINE' (property 'Rootkey' of TRegIniFile).
Services run out of user context, so for a service, a HKEY_LOCAL_USER
does not exist.
This is also why you are able to read the key when you run the service
with a user account.
HTH,
Christian