llu
Posts: 2
Joined: Tue Apr 12, 2022 4:46 pm

Can MSIX bundle generated by Build_MSIX_APPX uninstall previous build?

Wed Apr 13, 2022 8:47 pm

Hi,

I am trying Advanced Installer's Build_MSIX_APPX to see if the MSIX bundle generated can uninstall previous installed version before installing current version. Is this supported ? If yes, can someone please share instructions?

Thanks,

Liang

Catalin
Posts: 6509
Joined: Wed Jun 13, 2018 7:49 am

Re: Can MSIX bundle generated by Build_MSIX_APPX uninstall previous build?

Thu Apr 14, 2022 3:05 pm

Hello Liang and welcome to our forums,

Yes, that is possible.

For more information about this, please have a look over the following article:

How does MSIX package upgrades change industry best practices?

Hope this helps!

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

llu
Posts: 2
Joined: Tue Apr 12, 2022 4:46 pm

Re: Can MSIX bundle generated by Build_MSIX_APPX uninstall previous build?

Thu Apr 14, 2022 10:58 pm

Hi Catlalin,

Thank you for your instructions.

The issue I am facing is a little annoying. I used other tools (Windows Application Project) for my 3.8.2 MSIXBUNDLE signed with an EV code signing token that expired in February this year. I generated a new version 3.8.3 with a new EV token. Windows gives me this error when upgrading
"App installed failed with error message: Windows cannot install package xxxxxx_3.8.3.0_neutral~_hijkl because a different package xxxxxxx_3.8.2.0_neutral~_abcde r with the same name is already installed. Remove package xxxxxx_3.8.2.0_neutral~_abcde before installing. (0x80073cf3)" .

I had to uninstall 3.8.2 manually before proceeding to install 3.8.3.

I verified that this is due to the new token has slight different CN and O.
Old token has: CN=A.B. C (DEF INC.)
New token has: CN=AB C (Def Inc.) (There are no dots between A, B and C)

When I build 3.8.3 with Advanced Installer, will the package be able to uninstall 3.8.2 silently?

Thanks again.

Liang

Catalin
Posts: 6509
Joined: Wed Jun 13, 2018 7:49 am

Re: Can MSIX bundle generated by Build_MSIX_APPX uninstall previous build?

Tue Apr 19, 2022 1:39 pm

Hello Liang,

As you already mentioned, this is indeed a bug of Microsoft. More details about this can be found in the following:

[BUG] Package cannot automatically update when the signing certificate has changed

The good news is that we might be able to work this around - until Microsoft fixes it.

To do so, we can proceed as it follows:

- in the newer version of your MSIX, we change the "Package ID" slightly: "Package Information" page --> "Package" section --> "ID" field.

- the above change will allow us to install the two version side by side

- now, in the second version, we will configure a PowerShell script to be executed when our application runs (at the first launch, for instance). This PowerShell script job is to basically remove the older version.

For more details about this, please have a look over the following:

1. PSF: Trigger MSI installation from a MSIX package using PowerShell

where my colleague Dan explains how such script can be created.

2. MSIX PowerShell cmdlets

where we can see what predefined cmdlets PowerShell offer us to work with MSIX packages.

Hope this helps!

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

Return to “Common Problems”