title: Get Add Remove Programs List Exactly As Shown In Windows C# Framework 3.5 (Not 4.0)
body: <p>I have tried this approach to get the list of add/remove programs and it still does not give the exact list</p>
  
  <p>Look in at the registry in 3 places</p>
  
  <pre><code>installedSoftware.AddRange(GetInstalledSoftware(@"SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall"));
  installedSoftware.AddRange(GetInstalledSoftware(@"HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"));
  installedSoftware.AddRange(GetInstalledSoftware(@"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"));
  </code></pre>
  
  <p>Code:</p>
  
  <pre><code>private List&lt;string&gt; GetInstalledSoftware(string regKey)
  {
      var installedSoftware = new List&lt;string&gt;();
  
      using (RegistryKey key = Registry.LocalMachine.OpenSubKey(regKey))
      {
          if (key != null)
          {
              foreach (string subkey_name in key.GetSubKeyNames())
              {
                  using (RegistryKey subkey = key.OpenSubKey(subkey_name))
                  {
                      object displayName = subkey.GetValue(ToolResources.DisplayName);
  
                      if (displayName != null)
                      {
                          installedSoftware.Add(displayName.ToString());
                      }
                  }
             }
         }
      }
  
      return installedSoftware;
  }
  </code></pre>
  
  <p>This is a 4.0 solution but will NOT work in 3.5</p>
  
  <p><a href="https://stackoverflow.com/questions/15524161/c-how-to-get-installing-programs-exactly-like-in-control-panel-programs-and-fe">C#: How to get installing programs exactly like in control panel programs and features?</a></p>
  
  <p>What am I missing?</p>