I develop a Windows Service that will run under SYSTEM user. So I want to make a installer to configure this service. The installer will create entries in the windows registry.
When the Windows Service starts it will to read these entries, generated by the installer.
This entries will point to a Config File, and where to store the log files of the service.
Which key Do I need to write/read to make this work? I am worried about permissions.
Is it in the CURRENT_USER key?
I develop the Windows Service in Delphi.
Thanks,
Remy’s comment is correct.
The
SYSTEMaccount does not have their ownHKEY_CURRENT_USERregistry hive.You should be storing configuration information in
HKEY_LOCAL_MACHINE, or in your own custom xml configuration file in your AppData directory.Side note: i believe that attempts to use
HKEY_CURRENT_USERwhen no profile hive is loaded will get youHKEY_USERS/.DEFAULT; which isn’t something you want to be using.