<p>I know that we shouldn't being using the registry to store Application Data anymore, but in updating a Legacy application (and wanting to do the fewest changes), what Registry Hives are non-administrators allowed to use?  </p>

<p>Can I access all of <code>HKEY_CURRENT_USER</code> (the application currently access <code>HKEY_LOCAL_MACHINE</code>) without Administrator privileges?  </p>

[{'answer_id': 53160, 'author': 'Curt Hagenlocher', 'author_id': 533, 'author_profile': 'https://Stackoverflow.com/users/533', 'pm_score': 2, 'selected': False, 'text': "<p>Yes, you should be able to write to any place under HKEY_CURRENT_USER without having Administrator privileges.  But this is effectively a private store that no other user on this machine will be able to access, so you can't put any shared configuration there.</p>\n"}, {'answer_id': 53181, 'author': 'Euro Micelli', 'author_id': 2230, 'author_profile': 'https://Stackoverflow.com/users/2230', 'pm_score': 8, 'selected': True, 'text': '<p>In general, a non-administrator user has this access to the registry:</p>\n\n<p>Read/Write to:</p>\n\n<ul>\n<li><code>HKEY_CURRENT_USER</code></li>\n</ul>\n\n<p>Read Only:</p>\n\n<ul>\n<li><code>HKEY_LOCAL_MACHINE</code></li>\n<li><code>HKEY_CLASSES_ROOT</code> (which is just a <em>link</em> to <code>HKEY_LOCAL_MACHINE\\Software\\Classes</code>)</li>\n</ul>\n\n<p>It is possible to change some of these permissions on a key-by-key basis, but it\'s extremely rare. You should not have to worry about that.</p>\n\n<p>For your purposes, your application should be writing settings and configuration to <code>HKEY_CURRENT_USER</code>. The canonical place is anywhere within <code>HKEY_CURRENT_USER\\Software\\YourCompany\\YourProduct\\</code></p>\n\n<p>You could potentially hold settings that are global (for all users) in <code>HKEY_LOCAL_MACHINE</code>. It is very rare to need to do this, and you should avoid it. The problem is that any user can "read" those, but only an administrator (or by extension, your setup/install program) can "set" them.</p>\n\n<p>Other common source of trouble: your application should not write to anything in the <code>Program files</code> or the <code>Windows</code> directories. If you need to write to files, there are several options at hand; describing all of them would be a longer discussion. All of the options end up writing to a subfolder or another under <code>%USERPROFILE%</code> for the user in question.</p>\n\n<p>Finally, your application should stay out of <code>HKEY_CURRENT_CONFIG</code>. This hive holds hardware configuration, services configurations and other items that 99.9999% of applications should not need to look at (for example, it holds the current plug-and-play device list). If you need anything from there, most of the information is available through supported APIs elsewhere.</p>\n'}]
['https://Stackoverflow.com/questions/53135', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/3798/']