在RemoveExistingProducts中指定卸载.msi的位置
我正在使用 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
似乎违反了一些避免提示来源的规则。看看这些建议是否有帮助。
It seems that some rules of avoiding prompts for source are violated. See if these recommendations help.
除了这个答案之外,还请检查这个答案:“卸载 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.
在
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 inHKLM\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.