Search code examples
c#windows-installerinstallscript-msi

msi installer does not prompt user on upgrade


I have a simple msi installer setup.exe (created via VS2010).In the first installation everything is OK,The problem is in the second installation : 1.The msi settings are : a.RemovePreviousVersions is set to TRUE. 2.I upgraded the setup version(for the second installation) number and then pressed OK when i asked if i want to upgrade the product code.

At this point i recompiled the msi and double clicked on setup.exe. The problem: I expect that the installer will detect that there is already previous version installed and ask me if i want to remove\upgrade it. what happens is that the installer automatically upgrades the installed product to the new version without asking anything...

Is there any way to configure the msi project in order for it to prompt the "Upgrade\Remove" screen ????

Many thanks..


Solution

  • I have not used the VS Installer but it is severly limited. Technically your upgrade package must have

    1. A new Product Code
    2. The same Upgrade Code as your previous product

    You need also add the FindRelatedProducts and RemoveExistingProducts into the InstallE table in proper order. You can add some MSI guis on top of it but this would mean that you will have to edit the msi by hand with the Orca Editor. A simpler approach might be to use the Wix toolkit where you have more freedom. The question you have has already been answered there.