安装时删除其他软件

Remove other software on installation

安装我的软件时,我需要注意之前卸载了另一个 msi 包。这可能吗? burn 可以帮我做这个吗?

MSI / Major Upgrade: 您可以添加条目到 Upgrade table in one or all of the MSI files you install. Then the older / other MSI will be uninstalled before (or after) your MSI is installed. This is MSI's built in "major upgrade" feature intended to deliver upgrades for your own products, but you can uninstall any product you want that is MSI-based - even a competitive product - only if you are nuts, and do call legal first :-). Maybe see this description (related problem at least): .

Burn: Burn can 运行 EXE files that can initiate uninstall of pre-existing MSI files, but I would当您可以使用上述内置 MSI 方法时,切勿选择此方法。我不确定您是否可以通过 ExePackage element of Burn, but you trigger the uninstall from within a custom made EXE file in a myriad of ways: Uninstalling an MSI file from the command line without using msiexec 直接调用 msiexec.exe。这取决于您的 EXE 是用什么编写的。如果它是托管代码,则可以使用 DTF 方法(链接答案中的选项 6)。如果是 C++,也许使用 MSI API Win32 函数。 请参阅链接答案中的选项 14。我猜你也可以选择 shell 到 msiexec.exe(选项 3)。我的建议:始终使用本机代码进行部署。您的设置必须适用于任何机器、任何语言、任何状态和任何 OS 版本。还有许多其他变数。 最小依赖性 是唯一的治疗方法。