How to get InstallShield LE to uninstall the existing installation automatically?

僤鯓⒐⒋嵵緔 提交于 2019-11-28 17:04:17

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.

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.

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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!