2011-04-19 37 views
2

在我的WiX安裝包中,我定義一個屬性,然後定義一個使用此屬性的文本框,然後將此屬性傳遞給我的自定義動作。但在自定義操作中,我發現該屬性具有默認值,而不是我在文本框中指定的值。我該如何解決這個問題?附加到UI的屬性不會更改

<Property Id="DataSource" Value="."/> 
<Control Id="DataSourceText" Type="Edit" Text="." Height="17" Width="150" X="200" Y="18" Property="DataSource"/> 

然後在代碼

<CustomAction Id="SetCustomActionDataValue" Return="check" Property="CreateDatabase" Value="DataSource=[DataSource]" /> 
    <CustomAction Id="CreateDatabase" BinaryKey="Binary1" DllEntry="CreateDatabase" Execute="deferred" Return="ignore"/> 
    <InstallExecuteSequence>     
     <Custom Action='SetCustomActionDataValue' After="InstallFiles"/> 
     <Custom Action='CreateDatabase' After="SetCustomActionDataValue">NOT Installed AND NOT PATCH</Custom> 
    </InstallExecuteSequence> 

回答

3

,你打算在UI序列修改和執行順序使用必須Secure Custom Properties任何屬性後。

+0

謝謝,這工作。我使用大寫字母創建了我的屬性,並添加了Secure =「yes」屬性。 – 2011-04-19 16:17:31

+0

鏈接不起作用。 – 2011-04-19 18:13:16

+0

鏈接已修復。 – 2011-04-19 19:00:18