I want to replace VS setup with Inno installation. Check if the old version is installed. I found the MsiQueryProductState method. I found several examples similar to:
function MsiQueryProductState(ProductCode: string): integer; external ' MsiQueryProductStateA@msi.dll stdcall'; function MsiConfigureProduct(ProductCode: string; iInstallLevel: integer; eInstallState: integer): integer; external ' MsiConfigureProductA@msi.dll stdcall'; const INSTALLSTATE_DEFAULT = 5; INSTALLLEVEL_MAXIMUM = $ffff; INSTALLSTATE_ABSENT = 2;
Product verification always returned 2, not the required value 5 (INSTALLSTATE_DEFAULT)
I found an error, I will send it as an answer ...
Thanks freddy
source share