I made a NT service program, to read some information in the registry, I write the information in a self-built subdirectory under the Software key under HKEY_CURRENT_USER. If you: hkey_current_user / software / xxxxx has a separate parameter setup program. But I found that the parameters set in the setup program cannot be read in the Windows system service. Later, the reason is as follows. The system service runs under different user accounts, HKEY_CURRENT_USER is an alias in the HKEY_USERS structure. The registration button of the system service is under HKEY_USERS / .DEFAULT. Other primary keys in the registry are gum, only HKEY_CURRENT_USER is mapped to different places according to different users.
If you want to give a real user account, you need to set it on the service panel.
Rootkey: = HKEY_CURRENT_USER;
Later, I changed in HKEY_LOCAL_MACHINE / SOFTWARE / XXXXX.