在RemoveExistingProducts中指定卸载.msi的位置

发布于 2024-10-21 21:39:32 字数 316 浏览 3 评论 0原文

我正在使用 WiX 3.5 为我们软件的最新版本编写安装程序。以前版本的安装程序是使用InstallAware 8编写的。在安装过程中,我想删除旧版本,但InstallAware做了一些奇怪的事情,所以正常的RemoveExistingProducts方法不起作用。 msiexec /x {产品代码} 也没有。

当RemoveExistingProducts运行时,它会弹出一个对话框,询问旧安装中.msi文件的位置。我可以在注册表中找到它的位置,如果我在对话框中输入该位置,则卸载工作正常。但是我希望不显示该对话框,有什么方法可以告诉RemoveExistingProducts 在哪里可以找到它?

I'm writing an installer using WiX 3.5 for the latest version of our software. The installer for previous versions was written using InstallAware 8. During install I want to remove the old versions but InstallAware does some strange stuff so the normal RemoveExistingProducts method doesn't work. Neither does msiexec /x {PRODUCTCODE}.

When RemoveExistingProducts runs it pops up a dialog asking for the location of the .msi file from the old install. I can find the location of it in the registry and if I enter that location in the dialog the uninstall works fine. However I'd like for the dialog to not show, is there some way I can tell RemoveExistingProducts where to find it?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

嗫嚅 2024-10-28 21:39:32

似乎违反了一些避免提示来源的规则。看看这些建议是否有帮助。

It seems that some rules of avoiding prompts for source are violated. See if these recommendations help.

怪我鬧 2024-10-28 21:39:32

除了这个答案之外,还请检查这个答案:“卸载 MSI 的不同方法”。

检查是否有为您的旧设置定义的自定义卸载字符串:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\YOUR GUID HERE\UninstallString

这是在控制面板中添加/删除小程序。如果您在此处找到卸载字符串,则可以在运行新安装之前通过自定义操作运行卸载。有点难看,我更喜欢通过 setup.exe 运行安装过程。

另一个位置是:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Products

在这里您可以找到打包的 GUID。检查每个 GUID 下的内容,然后检查“InstallProperties”下的InstallSource。此路径是安装引擎将在其中查找卸载应用程序所需的 MSI 文件的搜索路径。

In addition to this answer, please also check this answer: "different ways to uninstall an MSI".

Check in to see if there is a custom uninstall string defined for your old setup:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\YOUR GUID HERE\UninstallString

This is the most common location used by the Add/Remove applet in Control Panel. If you find the uninstall string here you can run the uninstall via a custom action before running your new install. A bit ugly, I would prefer to run the install process via a setup.exe.

Another location is:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Products

Here you will find packed GUIDs. Check under each GUID and then under "InstallProperties" for the InstallSource. This path is the search path where the installation engine will look for the MSI file it needs to uninstall the application.

奶气 2024-10-28 21:39:32

HKLM\Software\Microsoft\Windows\CurrentVerison\Uninstall\\WindowsInstaller键设置为1,那么你需要在HKLM\Software\Microsoft\Windows\中查找CurrentVersion\Installer\UserData\S-1-5-18\Products\\InstallProperties\InstallSource 查看它认为 .msi 缓存的位置。基本上,请确保在搜索 InstallSource 时查看正确的注册表位置。

In the HKLM\Software\Microsoft\Windows\CurrentVerison\Uninstall\<GUID_or_product_name>\WindowsInstaller key is set to 1, then you need to look in HKLM\Software\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Products\<mangled_guid>\InstallProperties\InstallSource to see where it thinks the .msi is cached. Basically, make sure you're looking at the right registry location when searching for InstallSource.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文