jrectorSL
Posts: 4
Joined: Thu Feb 13, 2025 6:21 pm

MSI built with github action not removing older version

I am using the following to generate an MSI in our build pipeline on github. The msi works, but does not remove older versions from the Add/Remove programs.

Code: Select all

      - name: Create MSI
        uses: caphyon/advinst-github-action@v2.0
        with:
          advinst-version: '22.3'
          advinst-enable-automation: 'true'
          advinst-license: ${{ secrets.ADVINST_LICENSE }}
          aip-path: ${{ github.workspace }}/StudylogElectron.aip
          aip-build-name: DefaultBuild
          aip-package-name: StudylogElectron.msi
          aip-output-dir: ${{ github.workspace }}\msi
          aip-commands: |
            SetVersion ${{ steps.trim-version.outputs.trimmed }}

This is set in my .aip file

Code: Select all

  <COMPONENT cid="caphyon.advinst.msicomp.MsiUpgradeComponent">
    <ROW UpgradeCode="[|UpgradeCode]" VersionMin="0.0.1" VersionMax="[|ProductVersion]" Attributes="257" ActionProperty="OLDPRODUCTS"/>
    <ROW UpgradeCode="[|UpgradeCode]" VersionMin="[|ProductVersion]" Attributes="2" ActionProperty="AI_NEWERPRODUCTFOUND"/>
  </COMPONENT>
 
Any ideas on what I should be doing differently?
Catalin
Posts: 7513
Joined: Wed Jun 13, 2018 7:49 am

Re: MSI built with github action not removing older version

Hello and welcome to our forums,

Please note that in order for an upgrade to be performed (i.e. your new version removing the older version automatically), some conditions have to be met:

1. the new MSI should have a higher version

2. the new MSI should have a different ProductCode

3. the new MSI should have the same UpgradeCode

In your case, since the previous version is not removed and you do not get any errors during the installation, I would guess the 3rd point is not met.

If you change the UpgradeCode, the OS will think of your MSI as a totally different application and it will end up being installed side-by-side to the previous version.

Could you please check that and let me know if that's the case?

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
jrectorSL
Posts: 4
Joined: Thu Feb 13, 2025 6:21 pm

Re: MSI built with github action not removing older version

Please see the attached images. The versions are different, the product codes are different, and the upgrade codes are the same.

Both installers were built in github using the AI github action
ver61_2.png
ver61_2.png (50.04 KiB) Viewed 15433 times
ver62_2.png
ver62_2.png (51.22 KiB) Viewed 15433 times
ver62_3.png
ver62_3.png (14.69 KiB) Viewed 15433 times
Catalin
Posts: 7513
Joined: Wed Jun 13, 2018 7:49 am

Re: MSI built with github action not removing older version

Hello,

If you perform an upgrade and generate a log file for the 2nd version, e.g.:

Code: Select all

setup.exe /L*V log.txt
and look into the log file for the word "disallow", do you see anything?

I think your two setups might have shared resources and that is resulting in this.

Why files are left behind after package uninstall?

Could you please have a look over that and let me know if that's the case?

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
jrectorSL
Posts: 4
Joined: Thu Feb 13, 2025 6:21 pm

Re: MSI built with github action not removing older version

There are no instances of disallow in the file.

Also, I tested installing an older version of application and it will install alongside the existing application instead of giving an error message that a newer version of the application is already installed.
Catalin
Posts: 7513
Joined: Wed Jun 13, 2018 7:49 am

Re: MSI built with github action not removing older version

Hello,

I'm afraid I can't say for sure why this is happening.

If possible, can you please forward me a download link for the two setups by email at support at advancedinstaller dot com so I can run some tests and further investigate this scenario?

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
jrectorSL
Posts: 4
Joined: Thu Feb 13, 2025 6:21 pm

Re: MSI built with github action not removing older version

I can't send you the installer but I could send you the .aip file. If I build the .aip file through the Advanced Installer desktop application, the installer behaves as expected. If I build the .aip file with the GitHub action, the installer has the bad behavior so it looks like the issue is with the GitHub action.
Catalin
Posts: 7513
Joined: Wed Jun 13, 2018 7:49 am

Re: MSI built with github action not removing older version

Hello,

Please note I've replied to you over the email.

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

Return to “Building Installers”