是否有“最佳"的解决方案?强制“卸载"的方式MSI在卸载过程中失败时的产品? [英] Is there a "best" way to forcibly "uninstall" a product when the MSI fails during uninstall?

查看:99
本文介绍了是否有“最佳"的解决方案?强制“卸载"的方式MSI在卸载过程中失败时的产品?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于CustomAction中的错误,我的安装在卸载时失败.我已经修复了该错误,但是现在我有一台安装了该产品的测试机,但无法卸载(保持回退并保持原状).

My install fails on uninstall because of a bug in my CustomAction. I've fixed the bug, but I now have a test machine with that product installed and I can't get it to uninstall (keeps rolling back and staying).

过去(几年前),我使用Windows SDK附带的msizap.exe.但它似乎不再附带了.我安装了它,但是找不到.我唯一的猜测是它不再与Windows 10相关.

In the past (years ago), I used msizap.exe that comes with the Windows SDK. But it doesn't seem to come with it anymore. I installed it and can't find it. My only guess is that it's no longer relevant in Windows 10.

无论如何,是否有一种最佳方法来强制删除产品,以使Windows不再认为已安装该产品?

Anyway, is there a best way to forcibly remove the product so that Windows no longer thinks it's installed?

推荐答案

msizap.exe :您是正确的 msizap.exe 早已不推荐使用.

msizap.exe: You are correct, msizap.exe has been deprecated long ago.

卸载失败的解决方法 :此问题非常普遍.您可以在此处找到 用于解决此类卸载问题的方法列表 .

  • The easiest and fastest is probably to just use the Microsoft FixIt tool to remove the package. This basically "unregisters it" by the looks of it, and is similar to msizap.exe in that regard.
  • If this is just a single machine you can hack the cached installation database using Orca (how to find cached msi path, powershell version, using Windows Explorer - point 2) - if it involves many machines you should make a patch. Please see details in link above.

虚拟机 :很明显,但仅是说您应该检查虚拟机上的设置,以便在遇到开发"时可以还原虚拟机.和质量检查错误"像这样.

Virtual Machines: It is obvious, but just to mention that you should check setups on virtual machines so you can just revert the virtual machine when you encounter "development and QA bugs" like these.

自定义操作标志 :您还可以向每个自定义操作添加条件,以便可以禁止整个自定义操作通过发送给 msiexec.exe .

Custom Action Flag: You can also add a condition to each custom action so that you can disable the whole custom action from running by a custom command line sent to msiexec.exe.

如果您的标志是属性 RUNCA ="1" ,则可以通过将该标志属性设置为 0 来禁用它代码-通过某种方式接种该软件包的卸载功能-您可以在安装/卸载过程中完全禁用自定义操作,这甚至可能对您的技术支持人员有用和实际安装:

If your flag is a property RUNCA="1", then you can disable it by setting this flag property to 0 via the command line - this is sort of a little inoculation for the package's uninstall feature breaking - you can disable custom actions from running at all during install / uninstall - it might even be useful for your tech-support guys and real-world installations:

msiexec.exe /x {PRODUCT-CODE} RUNCA=0

这篇关于是否有“最佳"的解决方案?强制“卸载"的方式MSI在卸载过程中失败时的产品?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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