Setup InstallShield Limited Edition for VS2010 so it automatically uninstalls previous versions of my application
Asked Answered
P

1

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

Photoperiod answered 20/6, 2011 at 16:3 Comment(0)
S
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

Shrievalty answered 20/6, 2011 at 17:37 Comment(6)
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.Racon
Each new version should have a different Product Code. The versions are linked through Upgrade Code: msdn.microsoft.com/en-us/library/aa372399(VS.85).aspx?ppud=4Shrievalty
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.Racon
Also, from kb.flexerasoftware.com/doc/Helpnet/installshield12helplib/…: "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."Racon
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.Shrievalty
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.Racon

© 2022 - 2024 — McMap. All rights reserved.