title: Registry data being stored multiple times, and not where requested
body: <p>I'm writing a winforms app in C# and for part of it I want to store data in the registry. The data are licence keys and the app I've written is running with elevated (Administrator) permissions. The location where I want to store the values is: <code>HKEY_LOCAL_MACHINE\SOFTWARE\MyCompanyName\MyAppName\Licences</code>. I want it stored in LOCAL_MACHINE and not CURRENT_USER because I'm licencing the machine, not the user.</p>
  <p>When inspecting the registry I am using <code>%systemroot%\syswow64\regedit</code> and running with Administrator permissions. I've additionally checked with <code>c:\Windows\regedit</code> too. For both the following is true. I'm running 64 bit Windows 8.1 Pro (don't laugh).</p>
  <p>The code runs without error and stores the data. It also reads it back correctly too. However, the value is not created at the key location. Instead, having searched the registry for the value I created, it is being created at four places:</p>
  <p><code>HKEY_CLASSES_ROOT\VirtualStore\MACHINE\SOFTWARE\Wow6432Node\MyCompanyName\MyAppName\Licences</code></p>
  <p><code>HKEY_CURRENT_USER\Software\Classes\VirtualStore\MACHINE\SOFTWARE\Wow6432Node\MyCompanyName\MyAppName\Licences</code></p>
  <p><code>HKEY_USERS\S-1-5-21-1518458450-3113483475-3039049429-1106\Software\Classes\VirtualStore\MACHINE\SOFTWARE\Wow6432Node\MyCompanyName\MyAppName\Licences</code></p>
  <p><code>HKEY_USERS\S-1-5-21-1518458450-3113483475-3039049429-1106_Classes\VirtualStore\MACHINE\SOFTWARE\Wow6432Node\MyCompanyName\MyAppName\Licences</code></p>
  <p>So, a few questions. Am I using the right version of regedit? If so, how do I get my licences to write to the location I require? Why are they turning up in these other places?</p>
  <p>Thank you for any assistance rendered.</p>