如何使用相同的产品 ID 通过已安装的 msi 更新 Windows 安装程序包 [英] How to update Windows installer package over installed msi with same product id

查看:48
本文介绍了如何使用相同的产品 ID 通过已安装的 msi 更新 Windows 安装程序包的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个运行良好的 wix 安装程序项目.它可以轻松地在系统上安装我的应用程序.每当任何文件或服务发生任何变化时,我都会从控制面板卸载 msi 并在系统上安装新的 msi.

I have created a wix installer project which is working fine. It installs my application on system easily. whenever if there is any change in any file or service, i uninstall msi from controk panel and installs new msi on system.

但是每当我安装新的 msi 时,新安装后应用程序的所有设置都会更改,这听起来不太好.为了解决这个问题,我在 Product.wxs 文件中使用升级代码.但是当我在构建后安装新的 msi 时,却显示给定错误:

But whenever i install new msi, application's all setting change after new installation, that doesn't sound good. For sort out this, i am using Upgrade code in Product.wxs file. But when i install new msi after build, but is shows given error:

Another version of this product is already installed.  Installation of this version cannot continue.  To configure or remove the existing version of this product, use Add/Remove Programs on the Control Panel

因此,我想在文件发生任何更改且具有相同产品 ID 时更新 Windows 应用程序包.我只想更新已安装的 msi,不想删除它.

So, i want to update windows application package whenever there is any change in files and with same Product id. I just want to update installed msi, dont want to remove that.

推荐答案

您不能使用相同的 ProductId 进行升级,您需要更改它.最好的方法是设置 ProductId="*",这将在每次构建时更改它.您还需要增加版本号,最好通过使用主 exe 程序集版本号来完成.见 http://wix.sourceforge.net/manual-wix3/major_upgrade.htm 了解更多信息.

You cannot use the same ProductId to do upgrades, you need to change it. The best way is to set ProductId="*" and this will change it for every build. You will also need to increase the version number and this best done by using the main exe assembly version number. See http://wix.sourceforge.net/manual-wix3/major_upgrade.htm for more info.

这篇关于如何使用相同的产品 ID 通过已安装的 msi 更新 Windows 安装程序包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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