title: How can I find the upgrade code for an installed application in C#?
body: <p>I am using the C# wrapper for the  Windows Installer API from the <a href="http://wixtoolset.org/">WIX Toolset</a>. I use the <code>ProductInstallation</code> class to get information about the installed products such as the product code and product  name. </p>
  
  <p>For example</p>
  
  <ul>
  <li>Product Name - "My Test Application" </li>
  <li>Product Code - {F46BA620-C027-4E68-9069-5D5D4E1FF30A}</li>
  <li>Product Version - 1.4.0</li>
  </ul>
  
  <p>Internally this wrapper uses the <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/aa370130%28v=vs.85%29.aspx">MsiGetProductInfo</a> function. Unfortunately this function does not return the product's upgrade code.</p>
  
  <p>How can I retrieve the upgrade code for an installed application using C#?</p>