Remove the "<Property Id="ADDITIONAL_PARAMS" Secure="yes" Value="1" >" line.
Add: <Property Id="ADDITIONAL_PARAMS" Secure="yes" /> <CustomAction Id="SetADDITIONAL_PARAMS" Property="ADDITIONAL_PARAMS" Value="1" Execute="firstSequence" /> <InstallUISequence> <Custom Action="SetADDITIONAL_PARAMS" Before="AppSearch">NOT Installed AND NOT OLDERVERSIONDETECTED</Custom> </InstallUISequence> <InstallExecuteSequence> <Custom Action="SetADDITIONAL_PARAMS" Before="AppSearch">NOT Installed AND NOT OLDERVERSIONDETECTED</Custom> </InstallExecuteSequence> What this will do is keep ADDITIONAL_PARAMS as a secure property, but it won't get a "default" value unless this is a new installation (or major upgrade). Change OLDERVERSIONDETECTED to be whatever you have in your Upgrade table for removing older versions. -----Original Message----- From: Igor Lemsky [mailto:igor.lem...@gmail.com] Sent: Friday, October 02, 2009 1:11 AM To: General discussion for Windows Installer XML toolset. Subject: [WiX-users] Problem with storing checkbox state In my installer I have checkbox "Add also addiotional parameters" with property ADDITIONAL_PARAMS. Its value "1" if checkbox is checked, and no value if unchecked. Worked perfectly, but there are problems. I store property to the registry, and use regsearch to restore it during upgrade or reinstall. <RegistryValue Id="ADDITIONAL_PARAMSstore" Root="HKLM" Key="Software\Company\Installation" Name="ADDITIONAL_PARAMS" Type="string" Value="[ADDITIONAL_PARAMS]" /> ..... <Property Id="ADDITIONAL_PARAMS" Secure="yes" Value="1" > <RegistrySearch Id="ADDITIONAL_PARAMS_RS" Type="raw" Root="HKLM" Key="Software\Company\Installation" Name="ADDITIONAL_PARAMS" /> </Property> Problem if checkbox was unchecked during first installation. In registry we see key value of Software\Company\Installation\ADDITIONAL_PARAMS is null. It is ok: the property value in installer is also null and it is right. But during reinstall the checkbox become checked! Installer ignored that ADDITIONAL_PARAMS = null! May be it looks into registry, find no value and set default value from Property Value attribute? if I delete this attribute ( <Property Id="ADDITIONAL_PARAMS" Secure="yes">) then it correctly restored checkbox value (property value) from registry, but then during first install this checkbox become unchecked for default! But I need it to be checked for default. What can I do? ---------------------------------------------------------------------------- -- Come build with us! The BlackBerry® Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9-12, 2009. Register now! http://p.sf.net/sfu/devconf _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------------ Come build with us! The BlackBerry® Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9-12, 2009. Register now! http://p.sf.net/sfu/devconf _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users