2008-10-29 107 views
5

我在閱讀別人寫的WIX腳本。有一些代碼讓我很困惑。'&'和'!'的含義是什麼?屬性名稱之前?

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

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

那麼,什麼是 「!計劃」 和 「&調度程序」 之間的區別? 當屬性由「&」或「!」作爲前綴時,是否有特殊含義?

回答

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 
相關問題