title: Registry key EditionID has wrong value under WOW6432Node - by intention or bug? How to bypass?
body: <p>I'm running Windows 10 Professional 1809 build 17763.</p>
  
  <p>The value of <code>HKLM\SOFTWARE\ WOW6432Node\Microsoft\Windows NT\CurrentVersion\EditionID</code> is  <code>"Enterprise"</code>, which is wrong.
  <code>HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\EditionID</code> is <code>"Professional"</code>, which is correct.</p>
  
  <p>Is this a specific problem with my Windows installation? If not, how would you solve it if you would develop in 32 bit?</p>
  
  <p>My original code is in C++. Because I didn't understand the issue first, I reimplemented it in C#. I would appreciate solutions in C# or C++ and I'm confident that I can solve the issue in one language given a solution in the other language. Thank you!</p>
  
  <pre class="lang-cs prettyprint-override"><code>using System;
  using System.Collections.Generic;
  using Microsoft.Win32;
  
  class Program
  {
      static void Main(string[] args) {
          List&lt;string&gt; valueNames = new List&lt;string&gt; { "ProductName", "EditionID" };
          foreach (var valueName in valueNames) {
              string value = (string)Registry.GetValue(@"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion", valueName, "Key not found");
              Console.WriteLine($"{valueName}: {value}");
          }
      }
  }
  </code></pre>
  
  <pre class="lang-cpp prettyprint-override"><code>//---- C++ version
  #include "Registry.hpp" // Modern C++ Wrappers for Win32 Registry Access APIs by Giovanni Dicanio
  
  const std::wstring subKey{ L"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion" };
  const std::wstring value{ L"EditionID" };
  std::wstring ws = win32::RegGetString(HKEY_LOCAL_MACHINE, subKey, value);
  this-&gt;windowsEdition = std::string(ws.begin(), ws.end());
  </code></pre>
  
  <p><code>EditionID</code> should be <code>"Professional"</code>, but is <code>"Enterprise"</code>.</p>