MSI upgrade leaves version in Add/Remove Programs List

Got a problem you cannot solve? Try here.
amolago
Posts: 16
Joined: Wed Oct 29, 2014 9:15 pm

MSI upgrade leaves version in Add/Remove Programs List

Postby amolago » Tue Apr 22, 2025 10:39 pm

Hi,

Our IA project produces the Wrapper MSI for users to install. Once run (msiexec /i product_1.0.msi), there are several registry entries produced:

Code: Select all

HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{PRODUCT-CODE} (DisplayVersion=1.0.0)
HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{PRODUCT-CODE}
HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{WRAPPER-MSI-V1-PRODUCT-CODE} (DisplayVersion=1.0.0)
HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\My Product (DisplayVersion=1.0.0)

In Add/Remove Programs we see:
Name: My Product
Publisher: Us
Version: 1.0.0

All good with that, but now I run v2 (msiexec /i product_2.0.msi), which contains the code

Code: Select all

  if Variable NEEDSUPGRADE Equals TRUE
    Install/Remove MSI Package $PRODUCTCODE$[REMOVE=ALL] (get result into variable REMOVEOLD)
    ...


Which removes the old version, and installs the new version without issue. The only niggle now is the registry and two entries in the Add/Remove Programs:

Code: Select all

HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{PRODUCT-CODE} (DisplayVersion=2.0.0)
HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{PRODUCT-CODE}
HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{WRAPPER-MSI-V1-PRODUCT-CODE} (DisplayVersion=1.0.0)
HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{WRAPPER-MSI-V2-PRODUCT-CODE} (DisplayVersion=2.0.0)
HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\My Product (DisplayVersion=2.0.0)


Add/Remove Programs:
Name: My Product
Publisher: Us
Version: 1.0.0
Name: My Product
Publisher: Us
Version: 2.0.0

It seems there is no way of getting hold of the MSI wrapper product code without implementing some kind of registry search for old versions as part of the remove old code. I had the idea that I can interrogate the created MSI and find its product ID, then modify it to pass that value to the real setup and then store that value in the registry. I can then use that value as part of the remove old code.

Before I go implementing all kind of things to find the MSI product code, is there a better solution?

JohnGaver
Posts: 197
Joined: Mon Feb 05, 2024 6:15 pm

Re: MSI upgrade leaves version in Add/Remove Programs List

Postby JohnGaver » Wed Apr 23, 2025 2:47 am

Sounds like you're on the right track!

This page refers to the $GPOPATH$ variable, which might be helpful for you during your interrogations:

https://www.installaware.com/mh52/deskt ... wizard.htm

BTW, was there a reason you used the MSI wrapper for all your users at large? The main scenario it is intended to address is Group Policy Deployment, for which it works very well.

If you could let us know more about your particular scenario, we could possibly upgrade the plumbing for you here moving forward.
John Gaver
InstallAware Skunkworks
InstallAware Multi Platform - Liberating DEB/RPM/PKG/MSI(X) into universal native setups!
Get your free copy today - https://www.installaware.com/installaware-multi-platform.htm


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 49 guests