清空wix 3.8属性值,没有构建警告

时间:2014-07-07 11:54:07

标签: wix windows-installer warnings

我有一个wix 3.8 msi安装程序。我怎样才能摆脱这个警告?

<Property Id="DB_USER" />
...
<Control Id="UserEdit" Type="Edit" X="45" Y="45" Width="200" Height="20" Property="DB_USER" Text="{80}" />

“UserEdit”控件初始化为空,但我收到以下构建警告:

Property 'DB_USER' does not contain a Value attribute and is not marked as Admin, Secure, or Hidden. The Property element is being ignored.

尝试1:

<Property Id="DB_USER" Value=""/>

给出以下错误:

The Property/@Value attribute's value cannot be an empty string. If a value is not required, simply remove the entire attribute.

尝试2:

<Property Id="DB_USER" Value="[THIS_PROPERTY_DOES_NOT_EXIST]"/>

使用字符串“[THIS_PROPERTY_DOES_NOT_EXIST]”初始化控件,而不是获取不存在的属性的值。

尝试3:使用CustomAction清除DB_USER属性的内容,初始值为“ - ”。 InstallAction在InstallExecuteSequence中描述为After =“CostFinalize”。财产仍为“ - ”

1 个答案:

答案 0 :(得分:4)

您需要将该属性标记为安全。否则,您可以进入无法将属性传递到服务器端的情况。 (托管/ UAC安装)。