Hi,
Hope you are not getting tired with my name, since I've posted so many
questions these days :P
This time is about a strange behavior when I use Checkbox and the SetProperty
control.
On the UI, I have
[] Use proxy:
Address: ______ Port:____
([] is checkbox, and ____ is Edit)
In my dialog, I have
<Control Id="CheckboxUseProxy" Type="CheckBox" X="25" Y="133"
Width="280" Height="15" CheckBoxValue="1" Property="USE_PROXY"
Text="!(loc.GatewaySettings_UseProxy)" />
<Control Id="LabelAddress" Type="Text" X="40" Y="154" Width="35"
Height="15" Transparent="yes" NoPrefix="yes"
Text="!(loc.GatewaySettings_Address)" />
<Control Id="EditAddress" Type="Edit" X="80" Y="151" Width="165"
Height="18"
Property="PROXY_SERVER">
<Condition Action="disable"><![CDATA[ USE_PROXY <> "1"]]></Condition>
<Condition Action="enable"><![CDATA[ USE_PROXY = "1"]]></Condition>
</Control>
<Control Id="LabelPort" Type="Text" X="255" Y="154" Width="25"
Height="15" Transparent="yes" NoPrefix="yes"
Text="!(loc.GatewaySettings_Port)" />
<Control Id="EditPort" Type="Edit" X="280" Y="151" Width="30"
Height="18"
Property="PROXY_PORT">
<Condition Action="disable"><![CDATA[ USE_PROXY <> "1"]]></Condition>
<Condition Action="enable"><![CDATA[ USE_PROXY = "1"]]></Condition>
And in the Produce.wxs, I have
<Property Id="USE_PROXY" Value="0" />
<SetProperty Id="USE_PROXY" Value="1" After="LaunchConditions"
Sequence="ui"><![CDATA[PROXY_SERVER = ""]]></SetProperty>
I add the SetProperty code, wish to let user only need to specify PROXY_SERVER
and PROXY_PORT when launch the setup by msiexec, but no need to specify
USE_PROXY.
But I found the behavior is not what I want.
When I run msiexec with PROXY_SERVER=123.4.5.6
The checkbox is checked, the address is filled, but the address and port edit
are DISABLED.
When I run msiexec without PROXY_SERVER value
The checkbox is STILL checked, the address is empty, and it is enabled.
Seems to me there is something make the checkbox to be checked when it is
shown, and by default the two Edits are disabled.
So if <SetProperty> executed, then when dialog show, the value is not changed,
and the Edits keeps disabled.
If <SetProperty> is not executed, then when dialog show, the value is changed
to 1, and the Edits become enabled.
I've tried change the SetProperty's Sequence and Before/After, but still don't
work.
Why the checkbox does not respect USE_PROXY value, and always been checked? I
didn't find any attribute for the default value.
Thanks,
-Elfe
------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit. See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
WiX-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wix-users