2014-07-07 31 views
2

我有一个wix 3.8 msi安装程序。我怎样才能摆脱这个警告?空wix 3.8属性值,没有生成警告

<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属性的内容,初始值为“ - ”。 CustomAction在InstallExecuteSequence之后被描述为=“CostFinalize”之后。财产保持为“ - ”

+2

通过添加Secure =“yes”,警告即告解决。但是,我不需要SecureCustomProperties(http://msdn.microsoft.com/library/aa371571.aspx)。我是否应该为了摆脱这个警告而离开财产安全,还是有更好的办法? –

+0

你为什么认为你不需要它? –

回答

2

您需要将该财产标记为安全。否则,你可能会陷入财产不会传递给服务器端的情况。 (托管/ UAC安装)。