6

I am working on a WPF desktop application and I am deploying through an install file generated by InstallShield Limited Edition. I would like the installer to prompt the user and remove any previous versions of the application before installing the new version. I suspect this is done via the Upgrade Paths option in InstallShield, but I can't get it figured out.

Answer goes to an explanation or a link to a decent how-to, tutorial or manual page that answers my question.

At the moment, when running the installer, I get: "Another version of this product is already installed. Installation of this version cannot continue. To configure or remove the existing version of this product, use Add/Remove Programs on the Control Panel."

Thanks

Christopher Painter
  • 54,556
  • 6
  • 63
  • 100
Pieter Müller
  • 4,573
  • 6
  • 38
  • 54

1 Answers1

9

Try this:

  • in Solution Explorer go to "General Information" page
  • increase the Product Version
  • generate a new Product Code
  • make sure that ALLUSERS property has the same value as in the old package
  • go to "Upgrade Paths" page and add the old MSI
  • build and install your new version

When running this new package it should automatically detect and remove older versions.

You can read about Windows Installer upgrades here: http://msdn.microsoft.com/en-us/library/aa370579(VS.85).aspx

Cosmin
  • 21,216
  • 5
  • 45
  • 60
  • Hi Cosmis. I have since noticed that this solution simply installs multiple versions of the application - changing the Product Code means Windows sees it as an entirely different application, and it has no link to the previously installed version. I have not been able to get this to work yet, but I'm pretty sure generating a new Product Code is not the way to go. Soz. – Pieter Müller Jun 29 '11 at 14:34
  • 1
    Each new version should have a different Product Code. The versions are linked through Upgrade Code: http://msdn.microsoft.com/en-us/library/aa372399(VS.85).aspx?ppud=4 – Cosmin Jun 29 '11 at 15:07
  • Have you tested this? Because I've created a Hello World like app to test it with, and generating a new Product Code causes Windows to install the new version alongside the old version - the Add Remove Programs list shows both versions. Worse - my desktop shortcut still runs the old version. If you have tested this and get a different results, then perhaps some implementation changed? I am using VS2010, InstallShield LE, and Windows 7. – Pieter Müller Jun 29 '11 at 15:35
  • Also, from http://kb.flexerasoftware.com/doc/Helpnet/installshield12helplib/MajorMinorSmall.htm: "ProductCode—This is a Windows Installer property that contains the GUID of a product. Windows Installer treats two products with different ProductCode GUIDs as unrelated, even if the values for the ProductName property are the same." – Pieter Müller Jun 29 '11 at 15:36
  • You didn't read the full article. At the bottom there is a table with what needs to change for each upgrade type. For a major upgrade you need to change the Product Version and Product Code and keep the same Upgrade Code. This is also explained in the article I mentioned in my post. I edited my post to include some more suggestions. – Cosmin Jun 29 '11 at 18:42
  • 1
    The combination of a new Product Code AND the Upgrade Path solved the problem. It works! I nearly collapsed with joy. Thanks for your patience. – Pieter Müller Jun 30 '11 at 07:26