阻止Wix在我的产品中安装所有功能? [英] Preventing Wix from installing All Features in my Product?

查看:63
本文介绍了阻止Wix在我的产品中安装所有功能?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在安装MSP修补程序之后,Windows Installer决定安装初始MSI中提供的所有功能.如何防止MSP补丁安装所有可用功能?

After installing a MSP patch, Windows Installer decides to install ALL Features provided in the initial MSI. How can i prevent MSP patch from installing All available Features?

功能请求显示如下:

Installed: Absent
Request: local
Action : local

为什么要求全部安装?

推荐答案

我发现ADDLOCAL属性已设置为所有卸载功能".这导致了每个请求的请求:本地".我要解决的问题是使用一个小的自定义操作删除该属性.它需要在CostFinalize之前进行,因为需要在该操作之前定义要安装的功能. 变量REINSTALL包含已安装的功能,所有这些功能都需要REINSTALL.因此,MSP修补程序仅重新安装已安装的功能,而未卸载的功能保持不变.

I found out that the ADDLOCAL property was being set to all the Uninstalled Features. This caused a "Request: local" for each one. What i did to solve the issue was to use a small custom action that deletes this property. It needs to go before CostFinalize because the features to be installed need to be defined before that action. The variable REINSTALL holds the features that are already installed, and all of them are requested for REINSTALL. So the MSP patch only REINSTALLs the already installed features and leaves the uninstalled features untouched.

<CustomAction Id="REMOVE_ADDLOCAL_PROPERTY"
       Property="ADDLOCAL" Value="[NonExistentProperty]"
/>
<InstallExecuteSequence>
    <Custom Action="REMOVE_ADDLOCAL_PROPERTY" Before="CostFinalize">
        <![CDATA[PATCH]]>
    </Custom>
</InstallExecuteSequence>

最后,此解决方案适用于我的一个补丁程序,但不适用于另一个补丁程序.因此,到目前为止,我实现的最终解决方案是在补丁程序期间设置REINSTALL = ALL.

In the end, this solution worked for one of my patches, but failed for another. So the final solution i've implemented so far is to set REINSTALL=ALL during the Patch.This MSDN link stands that:

请注意,即使将REINSTALL设置为ALL,也只会重新安装以前已经安装的那些功能.因此,如果为尚未安装的产品设置了REINSTALL,则根本不会执行任何安装操作.

Note that even if REINSTALL is set to ALL, only those features that were already installed previously are reinstalled. Thus, if REINSTALL is set for a product that is yet to be installed, no installation action will take place at all.

所以我认为这是一个比删除ADDLOCAL属性更好的解决方案.而且它对两个补丁都有效.

so i think this is a better solution than removing the ADDLOCAL property. And also it worked for both patches.

这篇关于阻止Wix在我的产品中安装所有功能?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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