2014-07-07 29 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安裝)。