如何让用户在升级或完全安装之间进行选择? [英] How to let the user choose between upgrade or full install?

查看:74
本文介绍了如何让用户在升级或完全安装之间进行选择?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们的安装程序软件包始终以完整软件包的形式部署我们软件的新版本,而不会涉及已安装的版本.用户可以并行运行我们软件的所有版本.由于业务领域中的法律法规,我们需要使用此选项.一些客户正在其中工作.

Our installer package always deploys new versions of our software as full package, without touching the already installed version. Users can run all versions of our sofware side-by-side. We need to have this option because of legal regulations in the business domain some of our customers are working in.

但是,其他用户希望升级现有版本,他们不再需要旧版本,并且不受这些法规的约束.

Other users would however prefer upgrading the existing version, they don't need the old version anymore and are not bound to these regulations.

如果有可能的话,您将如何编写这样的安装程序包?

How would you author such an installation package, if it is possible at all?

我必须承认,我个人还没有看到这样的安装程序.供应商似乎通常会选择一种路线并坚持下去.

I must admit, I personally have not yet seen such an installer. Vendors seem to typically choose one route and stick with it.

推荐答案

您需要两次(以后再进行)单独的安装才能执行此操作.它们之间的基本区别是,一个拥有一个升级表(它将对已安装产品进行重大升级,在Programs& Features中对其进行替换),而另一个则没有一个升级表,这意味着它只是另一个产品以并行方式安装.在这两种情况下,它们都具有不同于所有已安装产品的ProductCode.

You need two (more later) separate installs to do this. The basic difference between them is that one has an Upgrade table (that will do a major upgrade of the already-installed product, replacing it in Programs&Features), and the other won't have an Upgrade table, which means it's just another product being installed in the side-by-side scenario. In both cases they have a ProductCode that is different from all the installed Products.

您需要一个引导程序,因为我认为您无法通过其他任何方式来执行此操作.引导程序询问用户该怎么做并启动安装选择.您不需要两个MSI文件-您可以具有一个带有转换(.mst文件)的MSI,该转换可以删除(或添加)升级表条目.您可以在带有升级表条目的MSI上使用Orca,删除创建转换的条目.对于升级,只需正常启动MSI文件即可;对于并排启动MSI,并使用包含TRANSFORMS = [删除升级表的mst文件]的命令行.

You'd need a bootstrapper because I don't think you can do this any other way. The bootstrapper asks the user what to do and launches the choice of installs. You don't need two MSI files - you can have a single MSI with a transform (a .mst file) that deletes (or adds) the Upgrade table entries. You could use Orca on the MSI with the Upgrade table entries, delete the entries creating a transform. For the upgrade just launch the MSI file normally; for the side-by-side launch the MSI with a command line that includes TRANSFORMS=[mst file that deletes the upgrade table].

您当然可以使用两个单独的MSI文件来执行此操作,但是您似乎已经对MSI文件的多个版本感到不满意,并且可能不希望添加更多版本.

Of course you could do this with two separate MSI files, but you already appear to be up to your ears with multiple versions of MSI files and may prefer not to add more.

可能有一个更简单的选择:通过RemoveExistingProducts操作执行旧产品的卸载.如果您有办法(例如通过属性值)检测到用户希望并行安装,则可以使RemoveExistingProducts操作以该属性为条件.

There may be a simpler alternative: It's the RemoveExistingProducts action that performs the uninstall of the older product. If there is a way for you detect (for example through a property value) that the user wants aside-by-side install then you could make the RemoveExistingProducts actions conditional on the property.

这篇关于如何让用户在升级或完全安装之间进行选择?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆