2011-04-19 35 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