Brian Modra
Posts: 6
Joined: Thu Apr 13, 2023 11:05 pm

Disconcerting use of Software\Microsoft\Windows\CurrentVersion\Uninstall

I noticed that in my AIP file there are some properties based on

Code: Select all

Software\Microsoft\Windows\CurrentVersion\Uninstall\[ProductName]
which are then used in other parts on the AIP. E.g.

Code: Select all

<ROW Component="DisplayIcon" ComponentId="{1BDAC750-36E0-428C-8A10-874BBA9E2D26}" Directory_="APPDIR" Attributes="4" KeyPath="DisplayIcon_1"/>
 ...
<ROW Registry="DisplayIcon_1" Root="-1" Key="Software\Microsoft\Windows\CurrentVersion\Uninstall\[ProductName]" Name="DisplayIcon" Value="[SystemFolder]msiexec.exe" Component_="DisplayIcon"/> 
Is this a problem?
I would have thought that the properties in the AIP should be based upon the registry values that persist, rather than on things that should not persist.

I started investigating these because I noticed that after an install, it left a second row in the Add-Remove programs list, so that my product is listed twice. I fixed that by removing the registry entry and all it's values

Code: Select all

Software\Microsoft\Windows\CurrentVersion\Uninstall\[ProductName]
...

Following is an excerpt from my AIP file with the "Uninstall" ones:

Code: Select all

  <COMPONENT cid="caphyon.advinst.msicomp.MsiRegsComponent">
    <ROW Registry="CurrentVersion" Root="-1" Key="Software\Microsoft\Windows\CurrentVersion" Name="+" Component_="CurrentVersion"/>
    <ROW Registry="DisplayIcon_1" Root="-1" Key="Software\Microsoft\Windows\CurrentVersion\Uninstall\[ProductName]" Name="DisplayIcon" Value="[SystemFolder]msiexec.exe" Component_="DisplayIcon"/>
    <ROW Registry="DisplayName_1" Root="-1" Key="Software\Microsoft\Windows\CurrentVersion\Uninstall\[ProductName]" Name="DisplayName" Value="[ProductName]" Component_="DisplayName"/>
    <ROW Registry="HelpLink_1" Root="-1" Key="Software\Microsoft\Windows\CurrentVersion\Uninstall\[ProductName]" Name="HelpLink" Value="[ARPHELPLINK]" Component_="HelpLink"/>
    <ROW Registry="InstallLocation_1" Root="-1" Key="Software\Microsoft\Windows\CurrentVersion\Uninstall\[ProductName]" Name="InstallLocation" Value="[APPDIR]" Component_="InstallLocation"/>
    <ROW Registry="Language" Root="-1" Key="Software\Microsoft\Windows\CurrentVersion\Uninstall\[ProductName]" Name="Language" Value="[ProductLanguage]" Component_="Language"/>
    <ROW Registry="Manufacturer" Root="-1" Key="Software\[Manufacturer]" Name="\"/>
    <ROW Registry="Microsoft" Root="-1" Key="Software\Microsoft" Name="+" Component_="Microsoft"/>
    <ROW Registry="Path" Root="-1" Key="Software\[Manufacturer]\[ProductName]" Name="Path" Value="[APPDIR]" Component_="ProductInformation"/>
    <ROW Registry="ProductName" Root="-1" Key="Software\[Manufacturer]\[ProductName]" Name="\"/>
    <ROW Registry="ProductName_1" Root="-1" Key="Software\Microsoft\Windows\CurrentVersion\Uninstall\[ProductName]" Name="\"/>
    <ROW Registry="Publisher_1" Root="-1" Key="Software\Microsoft\Windows\CurrentVersion\Uninstall\[ProductName]" Name="Publisher" Value="[Manufacturer]" Component_="Publisher"/>
    <ROW Registry="Software" Root="-1" Key="Software" Name="\"/>
    <ROW Registry="URLUpdateInfo_1" Root="-1" Key="Software\Microsoft\Windows\CurrentVersion\Uninstall\[ProductName]" Name="URLUpdateInfo" Value="[ARPURLINFOABOUT]" Component_="URLUpdateInfo"/>
    <ROW Registry="Uninstall" Root="-1" Key="Software\Microsoft\Windows\CurrentVersion\Uninstall" Name="+" Component_="Uninstall"/>
    <ROW Registry="UninstallPath_1" Root="-1" Key="Software\Microsoft\Windows\CurrentVersion\Uninstall\[ProductName]" Name="UninstallPath" Value="[SystemFolder]msiexec.exe /i [ProductCode]" Component_="UninstallPath"/>
    <ROW Registry="UninstallString_1" Root="-1" Key="Software\Microsoft\Windows\CurrentVersion\Uninstall\[ProductName]" Name="UninstallString" Value="[SystemFolder]msiexec.exe /i [ProductCode]" Component_="UninstallString"/>
    <ROW Registry="Version" Root="-1" Key="Software\[Manufacturer]\[ProductName]" Name="Version" Value="[ProductVersion]" Component_="ProductInformation"/>
    <ROW Registry="Version_1" Root="-1" Key="Software\Microsoft\Windows\CurrentVersion\Uninstall\[ProductName]" Name="Version" Value="[ProductVersion]" Component_="Version"/>
    <ROW Registry="Windows" Root="-1" Key="Software\Microsoft\Windows" Name="+" Component_="Windows"/>
  </COMPONENT>
Catalin
Posts: 6608
Joined: Wed Jun 13, 2018 7:49 am

Re: Disconcerting use of Software\Microsoft\Windows\CurrentVersion\Uninstall

Hello Brian,

Are you saying that after the install, you have two versions installed in the "Add or Remove programs"?

If that's the case, then I can think of two scenarios:

1. you changed the UpgradeCode of your application and therefore it is seen as a new app, not removing the previous one.

2. shared components which do not allow the removal of the previous version

Regarding those entries that you mentioned, please note that those are added automatically in any MSI package. This is how the Windows Installer knows to manage the packages.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Brian Modra
Posts: 6
Joined: Thu Apr 13, 2023 11:05 pm

Re: Disconcerting use of Software\Microsoft\Windows\CurrentVersion\Uninstall

Even on a first time install (from the MSI) - I was getting the two entries in the Add/Remove programs list:
Screenshot 2024-01-05 at 12.22.24 pm.png
Screenshot 2024-01-05 at 12.22.24 pm.png (62.71 KiB) Viewed 14700 times
The second one is expected (with our Icon). The first is not.

Then if I do this:

Code: Select all

reg delete "HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\TopographerWatcher" /f
then I will just see the one (expected) entry in add/remove programs.

This (above) seems like a bit of a hack.
I am wondering if I am missing something.
Catalin
Posts: 6608
Joined: Wed Jun 13, 2018 7:49 am

Re: Disconcerting use of Software\Microsoft\Windows\CurrentVersion\Uninstall

Hello Brian,

This is indeed quite strange.

If possible, could you please forward me the following resources:

- a copy of the AIP file

- a download link for the MSI setup

by e-mail at support at advancedinstaller dot com so I can run some tests on my end and further investigate this?

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

Return to “Building Installers”