MSI升级未达到升级时的自定义操作 [英] MSI upgrade not hitting the custom actions on upgrade

查看:105
本文介绍了MSI升级未达到升级时的自定义操作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我为Windows服务创建了一个安装程序,最初没有任何自定义操作事件。

几个月后,我升级了相同的MSI,但代码中有几个自定义操作事件和覆盖方法例如UnInstall之前,OnCommiting,Commit。



但似乎这些事件/方法在升级时没有被击中。



你能告诉我哪里出错或者我需要设置任何属性吗?

I created an installer to a windows service which didnt have any custom action events initially.
After few months, i upgraded the same MSI but with couple of custom action events and overriden methods in the code such as Before UnInstall,OnCommiting,Commit.

But it seems like those events/methods are not being hit upon upgradation.

Could you please suggest where i'm going wrong or do I need to set any properties?

推荐答案

如果你不改变包裹代码,msiexec将使用缓存版本,IIRC



REINSTALLMODE = vomus是摆脱这样的漏洞的好方法



实际的解决方案(我发现)是对所有相同的产品使用相同的升级代码,更改每个版本的包裹代码和产品代码(以及版本号),然后在升级表引用您的升级代码 - 这意味着每个msi构建都会删除并在每次运行时重新安装您的产品
if you're not changing the package code, msiexec will use the cached version, IIRC

REINSTALLMODE=vomus is a good way to get out of holes like this

the actual solution (i've found) is to use the same upgradecode for all the same product, change the package code and product code for every build (and the version number) and then add an entry on the Upgrade table quoting your upgradecode - it means every msi build removes and reinstalls your product on each run


这篇关于MSI升级未达到升级时的自定义操作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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