为什么 MSI 需要原始 .msi 文件才能继续卸载? [英] Why does MSI require the original .msi file to proceed with an uninstall?

查看:65
本文介绍了为什么 MSI 需要原始 .msi 文件才能继续卸载?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

正如大多数人可能注意到的那样,在卸载 MSI 包时,Windows 会要求提供原始的 .msi 文件.这是为什么?

As most of you probably noticed, when uninstalling an MSI package Windows will ask for the original .msi file. Why is that?

我只能看到它的缺点:

  • 无法适应网络变化.
  • 对本地磁盘更改没有弹性.
  • 用户出乎意料.
  • 通常要求用户离开办公桌并开始讨伐以获取正确的 CD.
  • 在某种程度上证明安装不是独立的.
  • 提倡使用不安全的工具,例如 msizap.
  • 这反过来又促进了下次我只使用 zip 文件"的心态.

有人可以解释一下吗?

推荐答案

修复损坏的卸载:您可以尝试最新的 Microsoft 的 FixIt 卸载工具 如果您在卸载 MSI 时遇到问题.还有一个链接:卸载无需使用 msiexec(卸载 MSI 的多种不同方法)即可从命令行获取 MSI 文件.

Fix Broken Uninstall: You can try the newest FixIt Uninstall tool from Microsoft if you have problems uninstalling an MSI. And one more link: Uninstalling an MSI file from the command line without using msiexec (a plethora of different ways to uninstall an MSI).

<小时>

更新:

这个新的支持工具(此工具现在也已弃用)如果您有需要卸载的失效 MSI 软件包(而不是过时的、弃用的、不受支持的),可以在最近的 Windows 版本上试用msizap.exe).

This new support tool (this tool is now also deprecated) can be tried on recent Windows versions if you have defunct MSI packages needing uninstall (rather than the outdated, deprecated, unsupported msizap.exe).

有些人建议使用 saschabeaumont 链接到的工具:无需 MSI 文件即可卸载.如果您尝试并有效,请务必告诉我们.该答案中的反馈表明它有效(到目前为止,我没有任何卡住的设置要测试).

Some have suggested to use the tool linked to here by saschabeaumont: Uninstall without an MSI file. If you try it and it works, please be sure to let us know. Feedback in that answer indicates that it works (I don't have any stuck setups to test with as of now).

为什么要求您提供原始安装介质?:

  • The original MSI is not needed for uninstall unless the MSI itself is badly designed - or the cached MSI is missing (see details below).
  • All installed MSI files are cached in %SystemRoot%Installer*.* using a random hex name.
  • The cached MSI file is used for any maintenance, repair and uninstall operations - and it is sufficient for uninstall in the vast majority of cases.
  • In some cases this cached file can be missing, and then uninstall is not possible at all in some cases (some theories as to why this can happen - MSI design errors, anti-virus quarantining, system restore, tinkering, developer system in erroneous state from development work, etc...). See more info below - and links to force uninstall or unregistration of the product.
  • The original source is only needed if files need to be copied to disk (for a maintenance install), or the MSI does an explicit request to resolve the original source via the standard action ResolveSource or via a custom action (which shouldn't be done in a properly authored package - I think the MS Office package contained this ResolveSource error back in the day, causing everyone to go looking for their installation CDs/DVDs).
  • In previous editions of Windows this cached MSI was stripped of all cabs, and hence contained the installer structure only, and no files.
  • Starting with Windows 7 (MSI version 5) the MSI files are now cached full size to avoid breaking the file signature which affects the UAC prompt on setup launch (a known Vista problem). This may cause a tremendous increase in disk space consumption (several gigabytes for some systems). Check this article and especially the discussion at the bottom for more intel.
  • To prevent caching a huge MSI file, you can run an admin-install of the package before installing. This is how a company with proper deployment in a managed network would do things, and it will strip out the cab files and make a network install point with a small MSI file and files besides it. Note that this may yield a UAC prompt is some cases since the extracted MSI file is no longer signed - this must be tested with your SOE / desktop configuration.
  • Read my answer in this thread for the full description of admin installs: What is the purpose of administrative installation initiated using msiexec /a? or this similar but perhaps more accessible answer: admin install and its uses
  • In some rare cases the cached MSI (with the random name) can be erroneously missing, and uninstall will then ask for the original MSI in order to complete the uninstall. This does not happen often. It used to be the case that one could use MsiZap.exe to clean out such an install, but this tool is outdated, deprecated and unsupported. Don't use it - there are too many incompatibilities with newer Windows versions and you create new problems. Perhaps try this support tool instead (also deprecated). The only option I can suggest now is this answer from saschabeaumont. If you try this tool, please let us know if it works for you. If you want to figure out what could have caused the cached MSI to be missing, try to read section 12 here: Uninstalling an MSI file from the command line without using msiexec (in short potential causes range from interference with system restore, anti virus and cleanup scripts, to erronous manual tweaking, low disk space, power outages, developer box debugging errors, badly designed MSI files with duplicate package codes, failed patches, etc... Many theories, few certainties I am afraid).
  • As a last resort you can try system restore (unless it has been disabled entirely or partly) to go back to a previous installation state and see if this solves your uninstall problem (you can find video demos of this on youtube or a similar site).
  • Be aware that system restore might affect Windows Update that must then be re-applied - as well as many other system settings. I have seen new, unsolvable installation problems resulting from a system restore, but normally it works OK. Obviously don't use the feature for fun, it's a last resort and is best used for rollback of new drivers or setups that have just been installed and are found to cause immediate problems and such issues. The longer you go back the more rework you will create for yourself. A lot of self-evident stuff, but I guess it needs to be mentioned.
  • Since I mentioned system restore I suppose I should mention the Last Known Good Configuration feature. This feature has nothing to do with uninstall or system restore, but is the last boot configuration that worked or resulted in a running system. It can be used to get your system running again if it bluescreens or halts during booting. This often happens after driver installs. This will do nothing to fix your failing uninstall though (or I would be very surprised).

相关答案:

除了这个答案,也许这篇关于卸载 MSI 包的各种方法的文章也很有趣.这是一篇相当受欢迎的文章,具有高浏览量:

In addition to this answer, perhaps this article on various ways of uninstalling MSI packages is of interest. It is a rather popular article with a high number of views:

这篇关于为什么 MSI 需要原始 .msi 文件才能继续卸载?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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