'&'的含义是什么?和'!'在属性名称之前?

时间:2008-10-29 10:38:30

标签: wix

我正在阅读其他人写的WIX脚本。有些代码让我很困惑。

<Custom Action='UnLoadSchedulerPerfCounters' After='InstallInitialize'>
    <![CDATA[(Installed) AND (!Scheduler = 3)]]>
</Custom>
<Custom Action='RollbackSchedulerPerfCounters' After='WriteRegistryValues'>
        <![CDATA[(&Scheduler = 3)]]>
</Custom>

那么,!Scheduler&Scheduler之间有什么区别? 如果属性由&!作为前缀,是否有任何特殊含义?

2 个答案:

答案 0 :(得分:7)

来自http://www.tramontana.co.hu/wix/lesson5.php#5.3

  

预先添加一些特殊字符   名字会给他们额外的   意思是:

%     environment variable (name is case insensitive)
$     action state of component
?     installed state of component
&     action state of feature
!     installed state of feature
     

最后四个可以返回以下内容   整数值:

-1   no action to be taken
1    advertised (only for components)
2    not present
3    on the local computer
4    run from the source

答案 1 :(得分:5)

这些是Windows Installer条件语法的运算符。有关完整列表,请参阅此MSI SDK文档:http://msdn.microsoft.com/en-us/library/aa368012.aspx