Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
568 views
in Technique[技术] by (71.8m points)

windows installer - How to get InstallShield LE to uninstall the existing installation automatically?

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)

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...