title: Getting version of current installed software during upgrade
body: <p>During upgrade, I want to retrieve version of the software that already is already installed. After researching a while I implemented this code:</p>
  
  <pre><code>&lt;MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." AllowSameVersionUpgrades="yes" /&gt;
  &lt;Upgrade Id="$(var.UpgradeCode)"&gt;
    &lt;UpgradeVersion Minimum="10.0.0.0" Maximum="$(var.VersionNumber)" OnlyDetect="yes" Property="DETECTED_VERSION" /&gt;
  &lt;/Upgrade&gt;
  </code></pre>
  
  <p>During upgrade, in custom action, when I read <code>DETECTED_VERSION</code> property it contains guid (probably product id). Is there a way to get the actual version?</p>