如何使用WiX MBA卸载MSI,但不能卸载捆绑包本身? [英] How can I uninstall a MSI but not the Bundle itself using WiX MBA?

查看:117
本文介绍了如何使用WiX MBA卸载MSI,但不能卸载捆绑包本身?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的要求:

我需要安装的MSI文件很少.用户可以选择他要安装/卸载的那个.为此,我使用了WiX引导程序,在其中使用WPF UI列出了所有MSI以及用于Intstall/Upgrade/Uninstall

I have few MSI files which need to be installed. User can select which one he wants to install/uninstall. For this purpose I have used WiX bootstrapper where I have used WPF UI to list down all the MSI and few buttons to Intstall/Upgrade/Uninstall

到目前为止,我可以使用InstallCondition安装选定的MSI,但无法管理卸载. 如果我卸载任何MSI,则捆绑软件也将被卸载.因此,它不会显示在添加/删除程序"中.

Till now I am able to install selected MSI using InstallCondition but could not manage the uninstall. If I uninstall any of the MSI, the Bundle is also getting uninstalled. Hence it is not showing in the Add/Remove Program.

所以我想知道是否有任何方法可以允许单个MSI的卸载,而不是捆绑软件本身的卸载?

So I would like to know if there is any way to allow uninstall of individual MSI but not the Bundle itself?

推荐答案

我猜因为您正在使用Engine.Plan(LaunchAction.Uninstall),因此您的捆绑软件已被卸载.如果您使用其他操作,例如InstallModify,则不应将其删除.

I'm guessing your bundle is getting uninstalled because you are using Engine.Plan(LaunchAction.Uninstall). If you use a different action like Install or Modify, it shouldn't be removed.

要控制各个MSI软件包的安装状态,我认为您可以在PlanPackageBegin的回调中进行设置.

To control the install state of the individual MSI packages, I think you can set that in a callback to PlanPackageBegin.

这篇关于如何使用WiX MBA卸载MSI,但不能卸载捆绑包本身?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆