windows 在没有 MSI 文件的情况下卸载
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/334490/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Uninstall without an MSI file
提问by ProfK
I often get a problem with Windows Installer trying to uninstall a package, but it complains that:
我经常在尝试卸载软件包时遇到 Windows Installer 问题,但它抱怨说:
The feature you are trying to use is on a network resource that is unavailable.
您尝试使用的功能位于不可用的网络资源上。
Is there a known means of uninstalling such packages when the original MSI is simply not available?
当原始 MSI 根本不可用时,是否有卸载此类软件包的已知方法?
采纳答案by Nick Kavadias
Take a look at a tool called MSIZapreleased by Microsoft.
看一个叫做的工具 微信公众平台由微软发布。
UPDATE:
更新:
MsiZap.exehas been deprecated for quite some time. Its use is unsupported on all recent versions of Windows, and it is considered a very unsafe tool to use.
MsiZap.exe已被弃用一段时间。所有最新版本的 Windows 都不支持使用它,并且它被认为是使用.
I added a link to a newer Microsoft support tool designed to clean out installations, but this tool also appears deprecated at this point. I have removed the link from the comments section.
我添加了一个指向更新的 Microsoft 支持工具的链接,该工具旨在清除安装,但此时此工具似乎也已弃用。我已经从评论部分删除了链接。
Perhaps try the tool linked to in saschabeaumont'sanswer below.
也许尝试在下面saschabeaumont 的答案中链接到的工具。
回答by saschabeaumont
Please note that Microsoft has now released an official tool to resolve these issues, without the problems that previously existed with MSIZAP.
请注意,微软现在已经发布了一个官方工具来解决这些问题,而没有以前存在于 MSIZAP 中的问题。
- Microsoft Fixit: Fix problems with programs that can't be installed or uninstalled
- Microsoft Fixit:修复无法安装或卸载的程序问题
回答by AnneTheAgile
FYI, this post explains the root problem https://superuser.com/q/293542/245923
仅供参考,这篇文章解释了根本问题 https://superuser.com/q/293542/245923
You can uninstall it using the product code:
您可以使用产品代码卸载它:
msiexec.exe /x {your-product-code-guid}
You would obtain this code from the MSI itself, or whatever tool you are using to build the MSI.
您可以从 MSI 本身或您用来构建 MSI 的任何工具中获取此代码。
Note that when you uninstall a product, it uses a cached MSI, since only the original MSI knows how to uninstall itself. When you use the product code, it uses the cached MSI from C:\WINDOWS\Installer.
请注意,当您卸载产品时,它会使用缓存的 MSI,因为只有原始 MSI 知道如何自行卸载。当您使用产品代码时,它使用来自 C:\WINDOWS\Installer 的缓存 MSI。
回答by Stein ?smul
Update, Stein ?smul: There is a whole list of cleanup approaches here(recommended).
更新,Stein ?smul:这里有一个完整的清理方法列表(推荐)。
UPDATE:
更新:
This newer support toolcan be tried on recent Windows versions if you have defunct MSI packages needing uninstall. This new tool appears to have been deprecated as well.
这个较新的支持工具如果您有需要卸载的已失效 MSI 软件包,可以在最近的 Windows 版本上试用。这个新工具似乎也已被弃用。
Perhaps try the tool linked to in saschabeaumont'sanswer.
也许尝试在saschabeaumont 的答案中链接到的工具。
It is not normal or standard MSI behavior to ask for the original source media - it indicates a badly designed MSI package.If you experience this with a vendor MSI it is highly recommended that you report the problem to their support team. Here is a more comprehensive explanationof the problem: Why does MSI require the original .msi file to proceed with an uninstall?
要求原始源媒体不是正常或标准的 MSI 行为 - 这表明 MSI 包设计不当。如果您在使用供应商 MSI 时遇到此问题,强烈建议您将问题报告给他们的支持团队。以下是对该问题的更全面的解释:为什么 MSI 需要原始 .msi 文件才能继续卸载?
In most cases MSI packages can be uninstalled from add/remove programsfrom the control paneleven if you don't have the original installation database for the MSI - the uninstall is run from a cached copy of the original MSI in the system folder %SystemRoot%\Windows\Installer(in some cases this cached MSI could be missing, see section 12 herefor potential causes).
在大多数情况下,MSI包可以从卸载添加/删除程序从控制面板中,即使你没有为MSI原始安装数据库-卸载从原来的MSI在系统文件夹中缓存副本运行的%SystemRoot %\Windows\Installer(在某些情况下,此缓存的 MSI 可能丢失,请参阅此处的第 12 节了解潜在原因)。
Earlier versions of MSI tended to trigger this problem (asking for the original installation media) more often (Office back in the day), and legacy MSI files can still cause uninstall problems that can only be solved using the msizap.exetool(this tool is deprecated, outdatedand no longer supported). This command line tool (msizap.exe) also had a GUI available (MSICUU2.exe), both tools are deprectated (try the link to the new cleanup tool listed above).
早期版本的 MSI 往往更频繁地触发此问题(要求原始安装介质)(当年的 Office),而旧版 MSI 文件仍会导致卸载问题,而这些问题只能使用 msizap.exe工具(此工具过时,过时的和不再支持)。这个命令行工具(msizap.exe) 还有一个可用的 GUI (MSICUU2.exe),这两个工具都已弃用(尝试上面列出的新清理工具的链接)。
Just for the record: If you have access to the original MSIthat was actually used to install the product, you can use this to run the uninstall. It must be the exact MSI that was used, and not just a similar one. There is a unique package guidassigned to each MSI file, so Windows will know if it is the right one.
只是为了记录:如果您有权访问实际用于安装产品的原始 MSI,您可以使用它来运行卸载。它必须是所使用的确切 MSI,而不仅仅是类似的MSI。每个 MSI 文件都有一个唯一的包 guid,因此 Windows 将知道它是否正确。
Related answers:
相关回答:
回答by TravisO
You didn't do something crazy like go to C:\Windows\Installer\ and delete the files in there did you?
你没有做一些疯狂的事情,比如去 C:\Windows\Installer\ 并删除那里的文件,是吗?
One drawback of MSI files is you need the complete MSI file in order to uninstall or repair the application. Windows loves to store a copy of the MSI. It also renames the MSI file from a common name to a GUID with no table (that I can find) to map original names (example: Office2010.msi
) to the new GUID so you have a PC with many GBs of wasted space that you can't delete. A machine that's not even 1 year old can easily hit 8 GB (example: mine).
MSI 文件的一个缺点是您需要完整的 MSI 文件才能卸载或修复应用程序。Windows 喜欢存储 MSI 的副本。它还会将 MSI 文件从通用名称重命名为没有表(我可以找到)的 GUID,以将原始名称(例如Office2010.msi
:)映射到新的 GUID,这样您的 PC 就会浪费许多 GB 的空间,而您不能删除。一台机器甚至不到 1 年就可以轻松达到 8 GB(例如:我的)。
回答by Martin Beckett
There is an MSI cleanup utility from Microsoft, Windows Installer Cleanup Utility(deprecatedtool, unsupportedand unsafeto use - perhaps try this answer instead: Uninstall without an MSI file).
Microsoft 有一个 MSI 清理实用程序, Windows 安装程序清理实用程序(不推荐使用的工具,不受支持且使用不安全- 也许试试这个答案:不使用 MSI 文件卸载)。
Or CCleanercan usually do this
或者CCleaner通常可以做到这一点
回答by StingyHyman
Control Panel --> Add/Remove programs?
控制面板 --> 添加/删除程序?
EDIT:Your post mentions nothing about using add remove programs to uninstall the app, you said the "Windows Installer" (MSIEXEC - see the link below), which is not the same thing.
编辑:你的帖子没有提到使用添加删除程序来卸载应用程序,你说的是“Windows Installer”(MSIEXEC - 请参阅下面的链接),这不是一回事。
http://msdn.microsoft.com/en-us/library/aa367988(VS.85).aspx
http://msdn.microsoft.com/en-us/library/aa367988(VS.85).aspx