VladiS
Posts: 4
Joined: Sun Dec 18, 2022 2:36 pm

Minor update fails if previous version was installed with renamed .msi package

Hello.
We've ran into an interesting issue. The scenario is as follows:

1. install the product using an msi file which is renamed from the original (can happen for example if you download 2 of them to the same folder and the new one is named installer (1).msi)
2. update to a new minor version (same product code) using a packaged exe installer (which will execute the msi with the original name e.g. installer.msi)
3. the update will fail, the logs will contain these lines:

Code: Select all

MSI (s) (94:4C) [03:22:19:635]: Note: 1: 2203 2: C:\Users\test\AppData\Roaming\VendorName\Product Name 1.2.3\install\ABCD1234\installer (1).msi 3: -2147287038 
MSI (s) (94:4C) [03:22:19:635]: Note: 1: 1316 2: C:\Users\test\AppData\Roaming\VendorName\Product Name 1.2.3\install\ABCD1234\installer (1).msi
MSI (s) (94:4C) [03:22:19:635]: SECREPAIR: Error determining package source type
MSI (s) (94:4C) [03:22:19:635]: SECREPAIR: Cleanup the Hash Value
MSI (s) (94:4C) [03:22:19:635]: SECUREREPAIR: SecureRepair Failed. Error code: 52461B451A8
-2147287038 -> 0x80030002 -> STG_E_FILENOTFOUND

using procmon we've managed to determine the source of installer (1).msi is from the registry

Code: Select all

HKLM\SOFTWARE\Classes\Installer\Products\{Product_Code_reveresed}\SourceList\PackageName
we confirmed changing that registry value to installer.msi before running the update fixes the issue, but attempting to do it via a custom action didn't work, as it looks like the installer reads that key before the first custom action is ran (see attached)

Is there a way to configure the installer to not care about this registry value?
If required i can share the full log privately, but it's reproducible rather simply.
We're using advanced installer 19.2
Thanks!
Attachments
Installer reads PackageName before first custom action is executed
Installer reads PackageName before first custom action is executed
Screenshot 2025-01-02 155114.png (105.49 KiB) Viewed 3170 times
Catalin
Posts: 7664
Joined: Wed Jun 13, 2018 7:49 am

Re: Minor update fails if previous version was installed with renamed .msi package

Hello Vladimir,

Please note that this is the normal behavior.

What we see here is one of the patch rules
The Target and Upgraded MSI packages must have the same name.
The option you are using (i.e. minor upgrade for EXE packages) follows some of the patch rules, this being one of them.

Regarding somehow skipping this, I'm afraid it is not possible - these pathces run on certain rules and those can not be broke, otherwise the package will stop working.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”