2008-10-29 29 views
5

Tôi đang đọc tập lệnh WIX do người khác viết. Có một số mã thực sự gây nhầm lẫn cho tôi.Ý nghĩa của '&' và '!' trước tên thuộc tính?

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

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

Vì vậy, sự khác biệt giữa "! Scheduler" và "& Scheduler" là gì? Có ý nghĩa đặc biệt nào khi thuộc tính được thêm tiền tố bởi "&" hoặc "!"?

Trả lời

7

Từ http://www.tramontana.co.hu/wix/lesson5.php#5.3:

prepending một số ký tự đặc biệt để tên sẽ cung cấp cho họ thêm ý nghĩa:

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

cuối cùng bốn có thể trả lại giá trị số nguyên sau:

-1 no action to be taken 
1 advertised (only for components) 
2 not present 
3 on the local computer 
4 run from the source 
Các vấn đề liên quan