Subject | Re: [IBO] off-top: Reading registry entries in win 2000 with serv ice |
---|---|
Author | Luiz Alves |
Post date | 2001-03-05T20:16:38Z |
Thanks to all,
I don't achieve to do TRegIniFile works in a service to read others keys
with RootKey<>HKEY_LOCAL_USER.
But I did with Tregistry and HKEY_LOCAL_MACHINE. It's working well.
Luiz.
I don't achieve to do TRegIniFile works in a service to read others keys
with RootKey<>HKEY_LOCAL_USER.
But I did with Tregistry and HKEY_LOCAL_MACHINE. It's working well.
Luiz.
----- Original Message -----
From: Christian Gütter <cguetter@...>
To: <IBObjects@yahoogroups.com>
Sent: Monday, March 05, 2001 1:19 PM
Subject: RE: [IBO] off-top: Reading registry entries in win 2000 with serv
ice
> Hui Luiz,
>
>
> > If I run the service into a user account, I can read from register.
> >
> > Does someone has a sample about how read windows registry in
> > a service start
> > up, when it's runnning as local system account?
>
> This is all IMHO:
>
> 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
>
>
>
>
>
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>