How to get InstallShield LE to uninstall the existing installation automatically?
Asked Answered
M

3

25

Is this possible?

All I can see searching around is basically that I need to use 3rd party tools (e.g. Orca) to get GUIDs from my existing MSIs and configure InstallShield with these to uninstall the existing version. I've tried one or two of these sets of instructions but nothing has worked so far. Probably because I'm doing something wrong, but it seems I'm jumping through a lot of hoops to do something that I would think should be relatively straight-forward. Hasn't this problem been solved before?

The top result in google points to this answer:

  • open your old MSI with Orca and get its UpgradeCode from Property table
  • in your InstallShield LE project go to "General Information" in solution explorer
  • make sure that the "Upgrade Code" field is set to your old MSI UpgradeCode

Does this mean I have to open my 'old MSI with Orca and get its UpgradeCode' every time I want to deploy a new version?

This sounds a little hackish, and is certainly something I don't want to have to do every time I deploy a new version. Is there a way to automate this? Is this functionality available in more advanced versions of InstallShield (bare in mind I'm on LE - I'll upgrade if necessary)

Minnieminnnie answered 18/7, 2012 at 11:41 Comment(3)
Do you need InstallShield LE to uninstall the previous version, or simply perform an in-place upgrade?Dottiedottle
Hi JYelton, ideally InstallShield would just do an upgrade. However, the messages I'm getting from the installer (setup.exe) is that the previous version needs to be uninstalled first.Minnieminnnie
The accepted answer to this question worked for me: [How to make InstallShield uninstall previous versions?][1] [1]: https://mcmap.net/q/393741/-how-to-make-installshield-uninstall-previous-versionsApocalyptic
D
61

InstallShield LE, like the Setup Project before it, allows for installation of a new version of product which will replace the previously installed version. As to whether it is technically an uninstall of the old product, or an in-place upgrade seems of little importance.

The key is in the difference between Product Code and Upgrade Code:

  • Product Code: Since this code uniquely identifies your product, changing the product code after you have already distributed your release is not recommended.

  • Upgrade Code: The upgrade code, stored in the UpgradeCode property, should remain the same for all versions of a product.

(This text is directly from the InstallShield LE help library.)

It isn't exactly straightforward how to use these codes to deploy products and version updates of the same product.

InstallShield LE General Information

The help text makes it sound like you should never change the product code. This is not the case. It should probably be written more clearly to say "Since this code uniquely identifies your product version, changing the product code after you have already distributed a particular release is not recommended." ... or something like that.

Basically you should change the Product Code when creating a new version to release. Leave the Upgrade Code alone! To change the Product Code, click the {..} button to the right of the code. InstallShield LE will generate a new code.

My standard procedure is to change the versions for my projects, generate a new product code, and build the InstallShield setup project.

When installing the product on a machine with an earlier version already installed, the setup project will update it and leave only one version (the latest) of the program installed on the target machine.

Dottiedottle answered 4/8, 2012 at 21:14 Comment(10)
Thank you for this. Unfortunately I'm not at work at the moment so I can't really check this to see if it works. We have a bank-holiday weekend here (Ireland) so it'll be Tuesday before I get to have a look at this.Minnieminnnie
Hi JYelton, I tried your suggestions, and it seems to be working - following your instructions I can install the new version without having to manually uninstall the old one. However, the old version still exists on in the "Add or Remove Programs" list (on XP, not tried in Windows 7). Do you know if there's a way to remove the old version?Minnieminnnie
It should replace the old version so long as its UpgradeCode is the same. If the application you are trying to replace was installed with a different installer or UpgradeCode, then you'll have to obtain its UpgradeCode using Orca so that you can use that in your InstallShield LE setup project.Dottiedottle
Sorry for posting on an old question, but I am having the same problem as @DaveDev. My UpgradeCode is exactly the same, but when I change the ProductCode and ProductVersion, I still have multiple versions in Add/Remove programs.Cranwell
I also experienced having two versions, but then I made an upgrade path and this fixed it (I supposed this is to let the installer know that it should try to upgrade/update)Kathlenekathlin
It works for my project (in win7) without abnormalities.Smoothie
I have also tried above steps but again I have two version of same application in add/remove programme entryStannfield
@Pet I suggested Orca for cases where you do not have access to the original installer project. For example if you just wanted to extract the UpgradeCode from an .MSI file so that your new InstallShield project can use the same code.Dottiedottle
@Dottiedottle -- I am yet another person who has experienced the "two versions are installed at the same time" problem. Can you please update your answer to deal with that?Universally
It seems you already figured this out by your comment under this answer: https://mcmap.net/q/393740/-configuring-installshield-le-to-remove-previous-versions-built-using-visual-studio-setup-projectsUniversally
P
4

As far as I understand, YJelton's answer is correct, but if you want to ensure that the old product is removed you should add a MajorUpgrade item to the Upgrade table -- if you keep the upgrade code the same (as was recommended) you can select the option "Products sharing my Upgrade Code" and for the Product Version you can select "Any earlier version".

This way, if the Upgrade Code is the same as your old product, and your new product has a later version number the old product will get removed.

If you want to change the upgrade code you can add a MajorUpgrade item that has the "Products having another Upgrade Code" option selected. Then paste in your old upgrade code.

Peach answered 12/6, 2013 at 15:30 Comment(1)
Where do you see the options "MajorUpgrade", "Products sharing my Upgrade Code" or "Any earlier version"? I can only add a "New Upgrade Path" and enter specific version numbers.Azov
A
-1

Go to "upgrade path" and set min version to blank, max ver. to current. include max/min to yes and set all code ids to one guid.

Antacid answered 11/5, 2016 at 11:40 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.