现有的卸载程序在升级过程中损坏-修补MSI? [英] Existing Uninstaller Broken During Upgrade - Patch MSI?

查看:58
本文介绍了现有的卸载程序在升级过程中损坏-修补MSI?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我写了一个自定义操作来帮助我的产品升级(从1.0升级到1.1).现在,我需要从1.1升级到1.2,但是现有的卸载程序在升级过程中会失败.我的自定义操作的执行条件错误.(经验教训,在部署之前始终测试升级到下一个版本).

I wrote a custom action to help during upgrade of my product (from 1.0 to 1.1). Now I need to upgrade from 1.1 to 1.2 but the existing uninstaller is failing during upgrade. I got the execution conditions of my custom action wrong. (Lesson learned, always test upgrading to the next version before deploying).

现在,看来我最好的选择是修改现有.msi中的InstallExecuteSequence表以禁用失败的自定义操作.我将不得不创建另一个自定义操作来浏览注册表,在C:\中找到现有的.msi.Windows \ Installer,对其进行修补,然后继续进行升级.这听起来像是一个可怕的,容易出错的解决方案,但是我真的很茫然.这本应是从远程云推送的自动无提示升级.

Right now it seems my best option is to modify the InstallExecuteSequence table in the existing .msi to disable the failing custom actions. I'll have to create another custom action to browse the registry, locate the existing .msi in C:\ Windows\Installer, patch it, and then continue with the upgrade. This sounds like a terrible, error prone solution, but I'm really at a loss. This was supposed to be an automatic, silent upgrade pushed down from a remote cloud.

另一种选择是编写批处理脚本以卸载现有产品,然后执行新的安装程序.

Another option would be to write a batch script to uninstall the existing product, then execute the new installer.

有什么建议吗?

编辑,该问题已在此处得到解答:

EDIT This question is already answered here: I screwed up, how can I uninstall my program?

推荐答案

支持此操作的方法是补丁(我的意思是MSP文件,而不是编码来更改缓存的MSI文件).到目前为止,这是摆脱困境的最直接方法.之后,进行升级.使用WiX,您可能可以将MSP和升级捆绑在一起.

The supported way to do this is a patch (by which I mean an MSP file, not coding to alter the cached MSI file). That's by far the most straightforward way to get out of the situation. After that, do the upgrade. Using WiX you could probably put the MSP and the upgrade in a bundle.

无论如何,您不会与其他MSI一起进行建议的更改.一个小的可执行文件可以完成您的建议,并且:

In any case, you wouldn't do your proposed change with another MSI. A small executable can do what you propose, and:

MsiGetProductInfo(产品代码,...,INSTALLPROPERTY_LOCALPACKAGE)

MsiGetProductInfo (ProductCode, …, INSTALLPROPERTY_LOCALPACKAGE)

是查找缓存的MSI的方式.

is how you find the cached MSI.

这篇关于现有的卸载程序在升级过程中损坏-修补MSI?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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