Try making the property public (ALLCAPS):
 
<Control Id="StartAppWithWindowsCheckBox" CheckBoxValue="1"
Type="CheckBox"
               Text="Start app on windows startup" Width="300"
Height="30" X="30" Y="60" Property="STARTAPPWITHWINDOWS" /> 
 
Then reference it in the component condition as the all-uppercase
property name.
 
- Brett


  _____  

        From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Ricardo
Lopes
        Sent: Friday, April 20, 2007 10:27 AM
        To: wix-users@lists.sourceforge.net
        Subject: [WiX-users] Conditional registry key using CheckBox
control
        
        
        Hi,
        
        I tried several ways and can't set a registry key only when the
user checks a checkbox.
        
        I Create a component with a condition that checks a property
(initialy set to "1" to make the checkbox control checked by default),
however it seems that the property value is not set by the control and i
have the Property attribute set for that control. The dialog is show
just before the VerifyReadyDlg the dialog sequence is the same as the
WixUI_InstallDir except for that extra dialog that has some checkboxes
to conditioning some aspects of installation (this was the first i tried
to get working, so the other do nothing for now..) 
        
        Here is the relevant part of my wix file:
        
        
                    <Component
Id="StartApplicationWithWindowsStartupComponent" Guid=".......">
                      <Condition><![CDATA[StartAppWithWindows =
1]]></Condition> 
                      
                      <Registry Root="HKLM"
Key="SOFTWARE\Microsoft\Windows\CurrentVersion\Run" Name="App"
Action="write" Type="string">
                        <RegistryValue>"[INSTALLLOCATION]App.exe"
-startup</RegistryValue> 
                      </Registry>             
                    </Component>
        
        ...
        
        <Property Id="StartAppWithWindows"><![CDATA[1]]></Property>
        <Dialog Id="BeforeVerifyReadyDlg" Width="370" Height="270"
Title="$( loc.CustomizeDlg_Title)">
                  <Control Id="StartAppWithWindowsCheckBox"
CheckBoxValue="1" Type="CheckBox"
                       Text="Start app on windows startup" Width="300"
Height="30" X="30" Y="60" Property="StartAppWithWindows" /> 
        
        ....
        
        I tried to get this to work like the way is show on a mailing
post that shows how to create a conditional shortcut but doesn't work
well in all situations.
        Help is really appreciated.
        
        Thanks. 
        Ricardo Lopes 

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to