This problem, in fact, is to avoid a problem I will not solve
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.
I saw the Checking for Oldies, However, it was found that FindRelatedProducts only performed on the first installation, that is, when I installed the MSI again, FindRelatedProducts did not.
<Upgrade Id='YOURGUID-7349-453F-94F6-BCB5110BA4FD'>
<UpgradeVersion OnlyDetect='yes' Property='SELFFOUND'
Minimum='1.0.1' IncludeMinimum='yes'
Maximum='1.0.1' IncludeMaximum='yes' />
<UpgradeVersion OnlyDetect='yes' Property='NEWERFOUND'
Minimum='1.0.1' IncludeMinimum='no' />
</Upgrade>
<CustomAction Id='AlreadyUpdated' Error='Foobar 1.0 has already been updated to 1.0.1 or newer.' />
<InstallExecuteSequence>
<Custom Action='AlreadyUpdated' After='FindRelatedProducts'>SELFFOUND</Custom>
<Custom Action='NoDowngrade' After='FindRelatedProducts'>NEWERFOUND</Custom>
</InstallExecuteSequence>
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.