title: How do you detect installed product versions at each startup?
body: <p>This problem, in fact, is to avoid a problem I will not solve</p>
  
  <p>When I install my product once and I use the MSI again, the unloading process is performed.
  However, this does not remove residual information from the registry, which must be cleaned Up using "Windows Installer Clean Up", and when reinstalled, a registry permission issue occurs.</p>
  
  <p>I saw the <a href="https://www.firegiant.com/wix/tutorial/upgrades-and-modularization/checking-for-oldies/" rel="nofollow noreferrer">Checking for Oldies</a>, However, it was found that FindRelatedProducts only performed on the first installation, that is, when I installed the MSI again, FindRelatedProducts did not.</p>
  
  <pre><code>&lt;Upgrade Id='YOURGUID-7349-453F-94F6-BCB5110BA4FD'&gt;
  &lt;UpgradeVersion OnlyDetect='yes' Property='SELFFOUND'
      Minimum='1.0.1' IncludeMinimum='yes'
      Maximum='1.0.1' IncludeMaximum='yes' /&gt;
  &lt;UpgradeVersion OnlyDetect='yes' Property='NEWERFOUND'
      Minimum='1.0.1' IncludeMinimum='no' /&gt;
  &lt;/Upgrade&gt;
  
  &lt;CustomAction Id='AlreadyUpdated' Error='Foobar 1.0 has already been updated to 1.0.1 or newer.' /&gt;
  </code></pre>
  
  <p></p>
  
  <pre><code>&lt;InstallExecuteSequence&gt;
      &lt;Custom Action='AlreadyUpdated'     After='FindRelatedProducts'&gt;SELFFOUND&lt;/Custom&gt;
      &lt;Custom Action='NoDowngrade' After='FindRelatedProducts'&gt;NEWERFOUND&lt;/Custom&gt;
  &lt;/InstallExecuteSequence&gt;
  </code></pre>
  
  <p>So I'd like to ask you guys
  How do I check every time I run MSI when I have installed it? Is it installed and the same version, If the same version has been installed, exit the installation process.</p>