l_d_allan
12th October 2005 14:09 UTC
Guideline? Use HKLM or HKLU?
Is there a guideline for whether to use HKLU (Local User) or HKLM (Local machine) for applications settings, uninstall information, and installation directory?
The norm seems to be to put the path to the application in HKLM and application settings in HKLU, but this varies a lot from application to application.
The NSIS examples seem to mostly use HKLM. Is this for a particular technical reason, or just convention (and it really doesn't matter).
kichik
12th October 2005 14:17 UTC
Application settings should always be kept in HKCU so every user can have his own settings. Other global settings, such as the uninstall information, are usually kept in HKLM. However, it's possible, on Windows 2000 and above (probably NT as well), to put those in HKCU to create a "private installation" for the user.
l_d_allan
12th October 2005 14:45 UTC
Thanks ... makes sense.
iceman_k
12th October 2005 15:57 UTC
Or you can use SHCTX and then SetShellVarContext appropriately.
l_d_allan
12th October 2005 16:15 UTC
Thanks ..... wasn't aware of SHCTX and SetShellVarContext. But it does seem like the end-user could encounter permission problems.