题
我正在阅读其他人写的WIX脚本。有些代码让我很困惑。
<Custom Action='UnLoadSchedulerPerfCounters' After='InstallInitialize'>
<![CDATA[(Installed) AND (!Scheduler = 3)]]>
</Custom>
<Custom Action='RollbackSchedulerPerfCounters' After='WriteRegistryValues'>
<![CDATA[(&Scheduler = 3)]]>
</Custom>
那么,!Scheduler
和&amp; Scheduler
之间的区别是什么?
当属性由&amp;
或!
作为前缀时,是否有任何特殊含义?
解决方案
来自 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
其他提示
这些是Windows Installer条件语法的运算符。有关完整列表,请参阅此MSI SDK文档: http://msdn.microsoft。 COM / EN-US /库/ aa368012.aspx 。
不隶属于 StackOverflow