附加到 UI 的属性不会更改
在我的 WiX 安装包中,我定义一个属性,然后定义一个使用该属性的文本框,然后将该属性传递给我的自定义操作。但在自定义操作内部,我发现该属性具有默认值,而不是我在文本框中指定的值。我该如何解决这个问题?
<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>
In my WiX install package I define a property, then define a textbox that uses this property, then pass this property to my custom action. But inside of the custom action I find out that the property has it's default value, not the one I've specified in the textbox. How can I fix that?
<Property Id="DataSource" Value="."/>
<Control Id="DataSourceText" Type="Edit" Text="." Height="17" Width="150" X="200" Y="18" Property="DataSource"/>
then later in the code
<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>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您打算在 UI 序列中修改并在执行序列中使用的任何属性都必须是 保护自定义属性。
Any properties that you intend to modify in the UI sequence and use in the Execute sequence must be Secure Custom Properties.