.net 如何手动删除MSI安装?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/4069431/
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
how to manually remove MSI installation?
提问by 5YrsLaterDBA
I am learning VS 2008 setup project to create install for our C# application. I made a mistake trying to delete the exe itself during the uninstall. Now I manually deleted the exe file but the entry still in Add Remove Program list. I try to install a fixed newer version but msi doesn't allow me to do so.
我正在学习 VS 2008 安装项目来为我们的 C# 应用程序创建安装。我在卸载过程中尝试删除 exe 本身时出错。现在我手动删除了 exe 文件,但该条目仍在添加删除程序列表中。我尝试安装固定的较新版本,但 msi 不允许我这样做。
How can I remove the old version manually (i can use regedit, no problem)? I am using XP machine. thanks
如何手动删除旧版本(我可以使用 regedit,没问题)?我正在使用XP机器。谢谢
EDIT: After I removed its subkey in that uninstall registry entry, I still cannot install my newer version.
编辑:在卸载注册表项中删除其子项后,我仍然无法安装我的较新版本。


采纳答案by Anton Tykhyy
回答by Michael Urman
If this is a proper small update / minor upgrade .msi file to fix an earlier version which couldn't uninstall, just install it with msiexec /i updated.msi REINSTALLMODE=vomus(and maybe also REINSTALL=ALL). The v of vomus will have Windows Installer replace the old package with the new, and then you can uninstall normally.
如果这是一个适当的小更新/次要升级 .msi 文件来修复无法卸载的早期版本,只需安装它msiexec /i updated.msi REINSTALLMODE=vomus(也许还有REINSTALL=ALL)。vomus的v会让Windows Installer把旧包替换成新包,然后就可以正常卸载了。
But of course all this is unnecessary these days with the ability to test on a virtual machine you can just revert...
但是当然,现在所有这些都是不必要的,因为能够在虚拟机上进行测试,您只需恢复...
回答by tonyjy
Remove your install entry in registry here. You might need to find out the GUID from your setup project.
在此处删除注册表中的安装条目。您可能需要从安装项目中找出 GUID。
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall OR
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall
Check also DisplayName, it can be helpful when your product has defined friendly name.
还检查 DisplayName,当您的产品定义了友好名称时它会很有帮助。

