Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Empty wix 3.8 property value, without build warnings

I have a wix 3.8 msi installer. How can I get rid of this warning?

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

"UserEdit" control is initialized as empty, but i get the following build warning:

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

Attempt 1:

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

gives the following error:

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

Attempt 2:

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

the control is initialized with string "[THIS_PROPERTY_DOES_NOT_EXIST]" instead of getting the value of a property that does not exist.

Attempt 3: with CustomAction that clears content of DB_USER property, having initial value as "-". CustomAction is described within InstallExecuteSequence being After="CostFinalize". Property remains as "-"

like image 701
Arnold Waldraf Avatar asked Sep 17 '25 15:09

Arnold Waldraf


1 Answers

You need to mark the property as Secure. Otherwise you can get into situations where the property won't be passed to the server side. (Managed / UAC installations).

like image 166
Christopher Painter Avatar answered Sep 20 '25 05:09

Christopher Painter