How to get InstallShield LE to uninstall the exist

2019-01-21 10:58发布

问题:

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)

回答1:

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.

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.



回答2:

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.



回答3:

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.