简体   繁体   English

如何清理损坏或丢失的安装(在添加/删除程序中不可见):该产品的另一个版本已安装错误

[英]How to clean up a corrupted or missing installation (not visible in add/remove programs) : Another version of this product is already installed error

I'm on a windows Server 2012 box and something has got messed up. 我在Windows Server 2012盒子上,东西弄乱了。 I was trying to uninstall my application from add/remove programs tool. 我试图从添加/删除程序工具中卸载我的应用程序。 When I tried to do it I saw below error message: 当我尝试执行此操作时,我看到以下错误消息:

在此处输入图片说明

So I went ahead and removed following registry entry with the help of which Windows manages the list of all the installed applications in add/remove programs tool: 因此,我继续并在Windows注册表的帮助下删除了注册表项,Windows通过Windows来管理添加/删除程序工具中所有已安装应用程序的列表:

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{C14DB2B2-6089-4C96-A878-77BA377BABBF}]

In this specific path I was able to figure out that the C14DB2B2-6089-4C96-A878-77BA377BABBF guid hive belongs to my product with the help of DisplayName key inside it 在此特定路径中,借助其中的DisplayName键,我能够弄清楚C14DB2B2-6089-4C96-A878-77BA377BABBF guid配置单元属于我的产品

Thereafter, I stopped seeing my application in add/remove programs tool window. 之后,我停止在“添加/删除程序”工具窗口中看到我的应用程序。 So, I thought I was done. 所以,我以为我完成了。

<< Update After seeing @Nikolay's answer >> << 看到@Nikolay的回答后更新 >>

There were two ways to encounter the error I was facing while trying to do a fresh install after this mess. 在此混乱之后,尝试进行全新安装时有两种方法遇到我遇到的错误。 I'm explaining both the routes: 我在解释这两种路线:

  1. When I tried to install the application by running the same myapplication.msi file then it shows below screen instead when I click "Next" button on the welcome screen. 当我尝试通过运行相同的myapplication.msi文件安装该应用程序时,则在欢迎屏幕上单击“下一步”按钮时,它将显示在屏幕下方。 It seems as if the program is still installed: 好像程序仍在安装:

在此处输入图片说明

  1. In another mess, somehow my MSI had got renamed in the build process which started to emit a new MSI name myapplication_x.msi . 麻烦的是,我的MSI在构建过程中被重命名,从而开始发出新的MSI名称myapplication_x.msi When I tried to install the application by running the newly named myapplication_x.msi file then it gives me below shown error message box: 当我尝试通过运行新命名的myapplication_x.msi文件来安装应用程序时,它在下面显示的错误消息框中显示了以下信息:

在此处输入图片说明

So overall I was not able to install a new MSI of my product and I was not seeing anything in "add/remove programs" window. 因此,总的来说,我无法安装产品的新MSI,并且在“添加/删除程序”窗口中看不到任何内容。 It seems I'm still missing something from registry stand-point. 从注册表的角度来看,我似乎仍然缺少某些东西。 Can someone help me to get rid of this issue either by cleaning some more registry entries or some better way if it exists to clear the traces of an installed product on a machine? 有人可以通过清除更多注册表项或某种更好的方式(如果有的话,可以清除计算机上已安装产品的痕迹)来帮助我摆脱此问题吗?

Removing the entry Uninstall\\{xxxxxxxxx} does not really uninstall the product. 删除条目Uninstall\\{xxxxxxxxx}并不会真正卸载产品。 It is similar to removing a program shortcut from the desktop. 这类似于从桌面删除程序快捷方式。 This does not really remove the program. 这并不能真正删除程序。

Try clicking "Remove" instead of "Modify" button in the add/remove control panel. 尝试在添加/删除控制面板中单击“删除”而不是“修改”按钮。 If there is only one button, "Modify/Remove", then you can try to remove the program from command line like this: 如果只有一个按钮“修改/删除”,则可以尝试从命令行中删除程序,如下所示:

> msiexec /x {C14DB2B2-6089-4C96-A878-77BA377BABBF}

In the worst case scenario if you have messed up your system completely by editing registry, there may be another option: 在最坏的情况下,如果您通过编辑注册表完全弄乱了系统,则可能还有另一种选择: MsiZap.exe tool MsiZap.exe工具 ( deprecated , unsupported and unsafe tools to use), that can wipe out all registry entries for a specified MSI. 不推荐使用不支持不安全的工具),这些工具可以清除指定MSI的所有注册表项。

UPDATE: There is a new FixIt tool from Microsoft that can be tried if you have applications that won't uninstall. 更新: Microsoft提供了一个新的FixIt工具,如果您有无法卸载的应用程序,则可以尝试。

That error indicates you are trying to install a package "related" to one that is currently on the machine without the appropriate instructions to msiexec. 该错误表明您正在尝试安装与计算机上当前存在的软件包“相关”的软件包,而没有对msiexec的适当说明。 This package is presumably a small update or minor upgrade (although possibly not a valid one, and I would be especially skeptical about any later uninstallation problems). 该软件包大概是一个小的更新或较小的升级(尽管可能不是有效的更新,对于以后的任何卸载问题,我尤其会持怀疑态度)。 Typically to install such an update you need to specify 通常,要安装此类更新,您需要指定

msiexec /i myapplication.msi REINSTALL=all REINSTALLMODE=vomus

Or, as Nikolay described, properly uninstall the existing package with msiexec /x {product-code} (the guid you saw in the Uninstall key of the registry is your product code). 或者,如Nikolay所述,使用msiexec /x {product-code}正确卸载现有软件包(在注册表的“卸载”键中看到的guid是您的产品代码)。

If that doesn't work, revert your test VM to a clean state and start over. 如果那不起作用,请将您的测试虚拟机恢复到干净状态并重新开始。

@Nikolay's answer helped me solve my problem and was a very clean approach. @Nikolay的回答帮助我解决了我的问题,这是一种非常干净的方法。 but in due course of solving this issue I figured out a registry key which might be of some help in case the situation on your machine is more messier. 但是在解决此问题的适当过程中,我发现了一个注册表项,以防万一您的计算机上的情况更加混乱。 Deleting this registry key had initially helped as well to get rid of this issue. 最初删除此注册表项也有助于摆脱此问题。 After deleting this registry key my new installer had started to work. 删除此注册表项后,我的新安装程序已开始工作。

This registry entry is present in HKEY_CLASSES_ROOT . 该注册表项位于HKEY_CLASSES_ROOT You will have to search the desired registry by initiating a search using your product name on HKEY_CLASSES_ROOT hive. 您将必须使用HKEY_CLASSES_ROOT配置单元上的产品名称启动搜索来搜索所需的注册表。 The full path was as below: 完整路径如下:

[HKEY_CLASSES_ROOT\Installer\Products\2B2BD41C980669C48A8777AB73B7BAFB]

Note : The guid shown in the above path is not the product code but a random guid generated during product registration while running the installer. 注意 :上面路径中显示的GUID不是产品代码,而是在运行安装程序时产品注册期间生成的随机GUID。

I just mentioned this registry path in case someone finds it of some use in more messier situations like the one I fell into. 我刚刚提到了此注册表路径,以防有人发现它在更混乱的情况下(如我掉进去的情况)有用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如果已经使用Wix安装了其他产品,如何防止安装 - How to prevent installation if other product is already installed, using Wix 我的产品已经安装/较新的版本 - my product is already installed / newer version anaconda 安装已安装 python - anaconda installation with python already installed 如果Windows中安装了较旧版本的软件,如何停止安装? - How to stop installation if older version of software installed in windows? 在“添加/删除程序”中隐藏卸载程序? - Hide the uninstaller in Add/Remove Programs? 安装自制软件 - 混淆版本和以前的安装 - 如何在没有警告的情况下安装所有内容? - Installation of homebrew - confusion over version and previous installation - how do I get everything installed without warnings? 使用我的计算机上安装的每个.NET版本获取程序列表 - Get list of programs using each .NET version installed on my machine 安装Drupal 7-“已安装”错误? - Installing Drupal 7 - “Already installed” error? Powershell自定义安装显示在“添加/删除程序”中 - Powershell custom install shows in Add / Remove Programs 在Wix中,升级产品时,如何确定已安装旧版本机器的文件覆盖和保存? - In Wix,When upgrading a product,how to decide the files overwriting and preservation for the machine which has installed an older version?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM