.net 使用 InstallShield LE 更新现有安装

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/12337860/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-03 16:36:25  来源:igfitidea点击:

Update an existing installation using InstallShield LE

.netwinformsinstallshield

提问by nambar

We've got a a quite simple WinForms application. I've created an installation using InstallShield LE which works fine on the first install. I'd like that users will be able to run the installation also for updating an existing copy. The problem is that I can't figure out what is the right way to create this update package. I've tried:

我们有一个非常简单的 WinForms 应用程序。我已经使用 InstallShield LE 创建了一个安装,它在第一次安装时运行良好。我希望用户也能够运行安装来更新现有副本。问题是我无法弄清楚创建此更新包的正确方法是什么。我试过了:

Changing the Product Code - the installation works but a new entry is being created in Add/Remove programs and the old entry is not removed.

更改产品代码 - 安装有效,但在“添加/删除程序”中创建了一个新条目,并且不会删除旧条目。

Keeping the Product Code - Windows installer shouts: "another version of this product is already installed"

保留产品代码 - Windows 安装程序喊道:“该产品的另一个版本已安装”

Tried to play with other codes (Upgrade Code / Product Version) - doesn't help

尝试使用其他代码(升级代码/产品版本) - 无济于事

Is there any easy way to create this? Maybe something to tell the installer to remove its previous version if exist?

有没有简单的方法来创建这个?如果存在的话,也许可以告诉安装程序删除其以前的版本?

回答by Sebastian

In your InstallShield setup project, you should do the following:

在您的 InstallShield 安装项目中,您应该执行以下操作:

  • select branch: Organize your setup-> Upgrade Paths
  • add new upgrade pathand than press the cancelbutton
  • the default properties of the new upgrade pathshould not be changed if you do not plan to change the Product versionfrom the following branch: Organize your setup-> General Information. If you plan to change the Product version, than you should play with the following upgrade pathproperties: Min Version/_Include Min Version_, Max Version/_Include Max Version_.
  • every time you need to create a new setup, change the Product codefrom the following branch: Organize your setup-> General Information.
  • please be aware that the Upgrade Codeshould NEVER be changed.
  • 选择分支:组织您的设置->升级路径
  • 添加新的升级路径,然后按取消按钮
  • 如果您不打算从以下分支更改产品版本,则不应更改新升级路径的默认属性:组织您的设置->常规信息。如果您计划更改Product version,那么您应该使用以下升级路径属性:Min Version/_Include Min Version_、Max Version/_Include Max Version_。
  • 每次需要创建新设置时,请从以下分支更改产品代码Organize your setup-> General Information
  • 请注意,永远不要更改升级代码

回答by Petar

  1. copy guid from /General info/"product code" to /Upgrade PAth / Upgrade code
  2. copy guid from /General info/"product code" to /General info / Upgrade code
  3. pres button "..." in /General info/product code to generate new guid

  4. Optional settings. In /Upgrade PAth / Upgrade code

    • disable max version
    • enable min version, for example you can put version 0.0.0.1 for minimal.
    • disable languale dependency
  1. 将 guid 从 /General info/"product code" 复制到 /Upgrade 路径 / 升级代码
  2. 将 guid 从 /General info/"product code" 复制到 /General info / Upgrade code
  3. 在/General info/product code 中按下按钮“...”以生成新的 guid

  4. 可选设置。在/升级路径/升级代码中

    • 禁用最大版本
    • 启用最小版本,例如您可以将版本 0.0.0.1 设为最小。
    • 禁用语言依赖