This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Windows Registry (A&G)
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 28, 2007
04:40 AM
Windows Registry (A&G)
Hi,
This one's "slightly" off-topic, but I'm hoping people will share their opinions/thoughts.
We have an application that stores user-specific settings under HKEY_CURRENT_USER but we also want to be able to store default settings for all users.
The developers of the application say we should use HKEY_USERS\.Default but I believe that we should use HKEY_LOCAL_MACHINE as HKEY_USERS\.Default is used only as a "template" when a new user logs into a PC.
Who's correct? Why? :confused:
This one's "slightly" off-topic, but I'm hoping people will share their opinions/thoughts.
We have an application that stores user-specific settings under HKEY_CURRENT_USER but we also want to be able to store default settings for all users.
The developers of the application say we should use HKEY_USERS\.Default but I believe that we should use HKEY_LOCAL_MACHINE as HKEY_USERS\.Default is used only as a "template" when a new user logs into a PC.
Who's correct? Why? :confused:
(3) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 28, 2007
09:50 AM
My recollection is the same as your description, that HKEY_USERS\.Default is used as a template for future new accounts (back in the Windows 9x days, I think it was used for the current user settings).
I imagine a simple test (try adding the data and seeing if the settings propagate to an existing account) would settle the bet...
P.S. Oops, maybe neither is correct: http://blogs.msdn.com/oldnewthing/archive/2007/03/02/1786493.aspx.
I imagine a simple test (try adding the data and seeing if the settings propagate to an existing account) would settle the bet...
P.S. Oops, maybe neither is correct: http://blogs.msdn.com/oldnewthing/archive/2007/03/02/1786493.aspx.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 29, 2007
11:48 AM
I think Roberts blog link explains why HKEY_USERS\.Default should not be used.
I tend to use HKCU for data specific to a user and HKLM for data that is the default for the application and applies to all users. Sometimes its useful to allow keys created under HKCU at run time, for example, to override the HKLM default settings.
If you use advertised shortcuts HKCU keys within your msi will get created when your applications is launched. I try to minimise what the install puts under HKCU (and other current user areas), but there is a mechanism in msi to propagate stuff to other users HKCU hives automatically. Unfortunately unless you write your own cleanup routine (not advisable) when the user uninstalls these keys will get left behind for all users except the one running the uninstall.
I’ve briefly goggled it and found this article which does suggest doing something similar.
I tend to use HKCU for data specific to a user and HKLM for data that is the default for the application and applies to all users. Sometimes its useful to allow keys created under HKCU at run time, for example, to override the HKLM default settings.
If you use advertised shortcuts HKCU keys within your msi will get created when your applications is launched. I try to minimise what the install puts under HKCU (and other current user areas), but there is a mechanism in msi to propagate stuff to other users HKCU hives automatically. Unfortunately unless you write your own cleanup routine (not advisable) when the user uninstalls these keys will get left behind for all users except the one running the uninstall.
I’ve briefly goggled it and found this article which does suggest doing something similar.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Aug 30, 2007
03:14 AM
Thanks for your replies (and links to articles)!
Robert, as predicted HKEY_USERS\.Default is NOT used as a template for future new accounts, the simple test did absolutely nothing. Apparently the default template is stored in a file rather then the registry (typical Microsoft!). Thanks for the pointers though.
Colbey, your link rocks and total backs up what I've been telling our developers all along - I've passed it on for them to digest and discuss 😄
Robert, as predicted HKEY_USERS\.Default is NOT used as a template for future new accounts, the simple test did absolutely nothing. Apparently the default template is stored in a file rather then the registry (typical Microsoft!). Thanks for the pointers though.
Colbey, your link rocks and total backs up what I've been telling our developers all along - I've passed it on for them to digest and discuss 😄
![](/skins/images/8CE4FAD0DE6F3A6F9D0567434D2D2DAE/responsive_peak/images/icon_anonymous_message.png)