title: Windows application registry settings and guidelines
body: <p>As I have been learning WiX to write an installer, I've learned a lot from documentation and tutorials how to setup a program during install and set or read registry values. However, the registry settings in said documentation and tutorials is done without explanation for what the requirements are for such settings.</p>
  
  <p>As a specific example, I have a WiX installer for a simple application with <code>InstallScope</code> set to <code>perMachine</code>. I wanted to add a "registered user" dialog to my WiX installer. I found an example which allows the user to enter their name, organization, and a registration key. These are set to the WiX pre-defined properties: USERNAME, COMPANYNAME, and PIDKEY, respectively. When these are validated, under the hood, WiX writes these out to the following registry folder:</p>
  
  <pre><code>HKLM &gt; Software &gt; Microsoft &gt; Windows &gt; CurrentVersion &gt; Installer &gt; UserData &gt; S-1-5-18 &gt; Products &gt; {GUID} &gt; InstallProperties
  </code></pre>
  
  <p>I've been doing a lot of research trying to find the answer to the following questions and have not been able to find the answers.</p>
  
  <ol>
  <li><p>What are the minimum requirements (or at least minimum Microsoft guidelines) for what registry entries need to be set when installing the simplest Windows application? I know that this depends somewhat whether the install is for all users (machine), or specific users, so there would be two different answers.</p></li>
  <li><p>Where are the standard locations that simple application information is supposed to be kept in the registry?</p></li>
  <li><p>In order to meet the guidelines/requirements of #1, what are the registry settings that WiX always creates under the hood without explicit XML entries to make them occur?</p></li>
  <li><p>Once certain registry items are set, as in the example given above, how does the application locate them properly using the registry API? Specifically, for example, if once installed, I want my app to be able to read the registered user information, does it literally have to know and open the entire key as shown above, or is there a Windows API call that handles part of that?</p></li>
  </ol>
  
  <p>I did find some promising looking information in the MSDN, in an article entitled, <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ee872121(v=vs.85).aspx" rel="nofollow noreferrer">Application Registration</a>, but I'm having trouble correlating the specifics of that article with what WiX does with the registry for an install. Specifically, for example, they suggest using <code>HKEY_LOCAL_MACHINE or HKEY_CURRENT_USER &gt; SOFTWARE &gt; Microsoft &gt; Windows &gt; CurrentVersion &gt; App Paths &gt; ...</code> but on my system (running Windows 10) that key doesn't even exist. So other apps aren't even using it. This leads back to my question #1.</p>