[DUG] Windows Service accessing registry
David Brennan
dugdavid at dbsolutions.co.nz
Tue Jul 26 22:17:56 NZST 2005
I think windows services can access the HKEY_CURRENT_USER key of the
registry... but as you would expect a service accesses it for the user that
service is running under (ie look in Administrative Tools->Services and see
which user account the service starts as). So you need to configure the
service to run under the correct user.
That said I imagine it is poor practice. HKEY_LOCAL_MACHINE seems a much
more logical place for a service (which is generally regarded as being
machine level rather than user level) to store it's registry information.
David.
-----Original Message-----
From: delphi-bounces at ns3.123.co.nz [mailto:delphi-bounces at ns3.123.co.nz] On
Behalf Of Trevor Jones
Sent: Tuesday, 26 July 2005 5:36 p.m.
To: 'NZ Borland Developers Group - Delphi List'
Subject: RE: [DUG] Windows Service accessing registry
A service can read from and write to HKEY_LOCAL_MACHINE, but you might also
try HKEY_USERS_DEFAULT if you store per-user information.
-----Original Message-----
From: delphi-bounces at ns3.123.co.nz [mailto:delphi-bounces at ns3.123.co.nz] On
Behalf Of Phil Middlemiss
Sent: Tuesday, 26 July 2005 5:13 p.m.
To: NZ Borland Developers Group - Delphi List
Subject: [DUG] Windows Service accessing registry
I've just worked out that Windows Services don't access the
HKEY_CURRENT_USER section of the registry even if I set it too (which
makes sense I guess). Where is the correct location in the registry I
should be reading and writing to for a Windows Service?
Phil.
_______________________________________________
Delphi mailing list
Delphi at ns3.123.co.nz
http://ns3.123.co.nz/mailman/listinfo/delphi
_______________________________________________
Delphi mailing list
Delphi at ns3.123.co.nz
http://ns3.123.co.nz/mailman/listinfo/delphi
More information about the Delphi
mailing list