安装过程中,有时候需要根据用户的设置来进行不同的安装,其中一个方面就是根据用户选择安装的Feature或者Component,来判断下一步的操作。
    Wix中提供了相关的判断方法和内置的状态值。
    Prepending some special characters to the names will give them extra meaning:
    %  environment variable (name is case insensitive)
    $   action state of component
    ?   installed state of component
    &   action state of feature
    !   installed state of feature

The last four can return the following integer values:
   -1   no action to be taken
   1   advertised (only for components)
   2   not present
   3   on the local computer
   4   run from the source

A few examples to make things clearer:

(&FeatureName = 3) AND NOT (!FeatureName = 3)

Run action only if the product will be installed locally. Do not run action on a reinstallation.

The term &FeatureName = 3 means the action is to install the feature locally.

The term NOT (!FeatureName = 3) means the feature is not installed locally.

(&FeatureName = 2) AND (!FeatureName = 3)

Run action only if the feature will be uninstalled.

This condition only checks for a transition of the feature from an installed state of local to the absent state.

(?ComponentName = 3) AND ($ComponentName = 2 OR $ComponentName = 4)

Run action only if the component was installed locally, but is transitioning out of state.

The term ?ComponentName = 3 means the component is installed locally.

The term $ComponentName = 2 means that the action state on the component is absent.

The term $ComponentName = 4 means that the action state on the component is run from source. Note that an action state of advertise is not valid for a component.

?ComponentName = $ComponentName

Run action only on the reinstallation of a component.

原文链接:http://blog.csdn.net/salever/article/details/4820931

Wix 使用总结(续)--关于Feature和Component的状态判断安装过程(转)的更多相关文章

  1. Wix打包系列(七) 添加系统必备组件的安装程序

    原文:Wix打包系列(七) 添加系统必备组件的安装程序 我们知道在vs的打包工程中添加系统必备组件是一件很容易的事情,那么在wix中如何检测系统必备组件并在安装过程中安装这些组件.这里以.Net Fr ...

  2. Installshield设置feature为必须选中状态,即必定安装状态

    原文:Installshield设置feature为必须选中状态,即必定安装状态 上一篇: 解决卸载时残留目标文件夹的问题Installation Designer --> Organizati ...

  3. 【HDU - 1429】胜利大逃亡(续) (高级搜索)【状态压缩+BFS】

    Ignatius再次被魔王抓走了(搞不懂他咋这么讨魔王喜欢)…… 这次魔王汲取了上次的教训,把Ignatius关在一个n*m的地牢里,并在地牢的某些地方安装了带锁的门,钥匙藏在地牢另外的某些地方.刚开 ...

  4. 解释一下核主成分分析(Kernel Principal Component Analysis, KPCA)的公式推导过程(转载)

    KPCA,中文名称”核主成分分析“,是对PCA算法的非线性扩展,言外之意,PCA是线性的,其对于非线性数据往往显得无能为力,例如,不同人之间的人脸图像,肯定存在非线性关系,自己做的基于ORL数据集的实 ...

  5. 核主成分分析(Kernel Principal Component Analysis, KPCA)的公式推导过程

    KPCA,中文名称”核主成分分析“,是对PCA算法的非线性扩展,言外之意,PCA是线性的,其对于非线性数据往往显得无能为力,例如,不同人之间的人脸图像,肯定存在非线性关系,自己做的基于ORL数据集的实 ...

  6. Wix打包系列(一)如何使用wix制作安装程序

    原文:Wix打包系列(一)如何使用wix制作安装程序 最近由于项目需要,需要给客户制作安装程序,一开始使用vs2005自带的打包工程来打包,但用了一段时间发现vs打包太死板,而且使用起来问题很多.收费 ...

  7. Android自动化学习笔记之MonkeyRunner:官方介绍和简单实例

    ---------------------------------------------------------------------------------------------------- ...

  8. monkeyrunner功能函数

    MonkeyRunner Command Summary 1. #导入模块;    from com.android.monkeyrunner import MonkeyRunner, MonkeyD ...

  9. android 自动化(1)

    学习android自动化测试要感谢一个朋友耐心的指导 环境搭建:(需要java JDK 以及android SDK) JDK:http://www.oracle.com/technetwork/jav ...

随机推荐

  1. MySQL5.7.26 忘记Root密码小计

    以前直接修改mysql.user就ok了,现在不行了,正好虚拟机MySQL的root密码忘记了,就简单记录下:(本方法不适合互联网线上项目,除非你不在意这段时间的损失) PS:以UbuntuServe ...

  2. centos7 mysql允许远程连接设置

    Mysql为了安全性,在默认情况下用户只允许在本地登录,可是在有此情况下,还是需要使用用户进行远程连接,因此为了使其可以远程需要进行如下操作: 一.允许root用户在任何地方进行远程登录,并具有所有库 ...

  3. ARDUINO解析GPS数据,读取出来GPRMC帧数据

    测试板子使用ARDUINO MEGA2560 #include <TimerOne.h> #define GPSSerial Serial1 #define DebugSerial Ser ...

  4. NPM安装配置

    http://www.tuicool.com/articles/mmYZBn http://npm.taobao.org/ 安装Nodejs后即可开始NPM之旅了,新建一个package.json或者 ...

  5. iOS JSON 和 Mode l转换

    MJExtension  是我们项目开发常用的一个第三方框架  很好用. https://github.com/CoderMJLee/MJExtension 映射 json  value key  直 ...

  6. [原创]java WEB学习笔记19:初识MVC 设计模式:查询,删除 练习(理解思想),小结 ,问题

    本博客为原创:综合 尚硅谷(http://www.atguigu.com)的系统教程(深表感谢)和 网络上的现有资源(博客,文档,图书等),资源的出处我会标明 本博客的目的:①总结自己的学习过程,相当 ...

  7. 剑指offer——圆圈中最后剩下的数字

    1.如果通过环形列表去模拟圆圈的话,最后时间复杂度为O(mn),而且还需要一个辅助链表来模拟圆圈,空间复杂度为O(n). 2.通过找出递推公式的方法,求得递推公式为 时间复杂度为O(n),空间复杂度为 ...

  8. 常量池、perm(持久代)、方法区、栈

      常量池.perm(持久代).方法区.栈 常量池指的是在编译期被确定,并被保存在已编译的.class文件中的一些数据. 除了包含代码中所定义的各种基本类型(如:int.long等等)和对象型(如St ...

  9. 《python基础教程(第二版)》学习笔记 语句/循环/条件(第5章)

    <python基础教程(第二版)>学习笔记 语句/循环/条件(第5章) print 'AB', 123 ==> AB 123 # 插入了一个空格print 'AB', 'CD' == ...

  10. 2.HelloWorld程序

    1.流程图 2./itcast0711/src/main/java/cn/itcast/a_helloworld/HelloWorld.java package cn.itcast.a_hellowo ...