a.guelle
Posts: 97
Joined: Tue May 19, 2015 2:23 pm

[solved] Non-deterministic behaviour on re-install

Mon Jun 01, 2015 2:13 pm

Hi,

when building an MSI package I am doing the same routine over and over again: installing, testing, modifying the MSI package and installing again.

Mostly the installer automatically uninstalls the previous installation before installing the new one. Bur sometimes I does not. Then I get a dialog with "Repair", "Modify" and "Uninstall".

So what am I doing wrong?
Last edited by a.guelle on Wed Jun 24, 2015 9:17 am, edited 1 time in total.

Dan
Posts: 4513
Joined: Wed Apr 24, 2013 3:51 pm

Re: Non-deterministic behaviour on re-install

Tue Jun 02, 2015 8:32 am

Hello,

If you run the same installation package for the second time then Windows Installer will run the installer in maintenance mode and the user will then be presented with choices to alter the installed product, repair it or remove it (done through the MaintenanceTypeDlg). This is happening because the installation package has the same PackageCode GUID. A new PackageCode is generated each time you build your project. Think of the PackageCode as some sort of checksum. No two .msi files should ever have the same PackageCode unless they are identical.

Please take a closer look on the Product Identification article.

Windows Installer can upgrade the original package only if the modified one has a higher version and a different Product Code. If you don't want to create a new version of the package, you need to uninstall the original MSI before installing the modified one. However, if you want to create a new version which will upgrade the old one, you can follow the steps explained in the Upgrades article.

If you have other questions, please let us know.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

a.guelle
Posts: 97
Joined: Tue May 19, 2015 2:23 pm

Re: Non-deterministic behaviour on re-install

Tue Jun 02, 2015 3:14 pm

Hi Dan,

that makes sense. So whenever I built a new package the old one was uninstalled automatically (though I did not change the ProductID). But in the seldom cases that I just ran a built package again, I got the modifying dialog.

Thanx for the explanation,

Angelo

-solved-

Dan
Posts: 4513
Joined: Wed Apr 24, 2013 3:51 pm

Re: Non-deterministic behaviour on re-install

Wed Jun 03, 2015 8:28 am

You're welcome Angelo,

If you have other questions, please let us know.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”