title: OpenSubKey() returns null for a registry key that I can see in regedit.exe
body: <p>I'm trying to get all the display names of the sub keys within this key:</p>
  
  <pre><code>HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall
  </code></pre>
  
  <p>With this code:</p>
  
  
  
  <pre class="lang-cs prettyprint-override"><code>     RegistryKey newKey;
       string val;
  
       string KeyPath64Bit = @"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall";
       RegistryKey mainKey = Registry.LocalMachine.OpenSubKey(KeyPath64Bit);
  
       string[] RegKeys64Bits = Registry.LocalMachine.OpenSubKey(KeyPath64Bit).GetSubKeyNames();
  
       foreach (string s in RegKeys64Bits)
       {
          newKey = mainKey.OpenSubKey(s);
          val = newKey.GetValue("DisplayName", -1, RegistryValueOptions.None).ToString();
          if (val != "-1")
             file64.WriteLine(val);
       }
  </code></pre>
  
  <p>After running the code I can't find one of the keys I need:</p>
  
  <pre class="lang-cs prettyprint-override"><code>HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{DA5E371C-6333-3D8A-93A4-6FD5B20BCC6E}
  </code></pre>
  
  <p>And it should have the display name: Microsoft Visual C++ 2010  x64 Redistributable - 10.0.30319, but instead the <code>GetSubKeyNames()</code> method gives me the sub key : <code>{DA5E371C-6333-3D8A-93A4-6FD5B20BCC6E}.KB2151757</code> which doesn't have any display name.</p>
  
  <p>Why can't I get the exact sub key I need (<code>{DA5E371C-6333-3D8A-93A4-6FD5B20BCC6E}</code>) and how can I get it?</p>