Also, instead of saving the features you picked in the registry, you may prefer to use the MigrateFeatureStates activity that is built into Windows Installer and was intended for maintaining feature settings across major upgrades (minor upgrades and small updates preserve feature settings automatically since they are technically maintenance transactions).
You get that by specifying the MigrateFeatures attribute on the UpgradeVersion element. -----Original Message----- From: Rob Hamflett [mailto:r...@snsys.com] Sent: Monday, October 26, 2009 9:32 AM To: wix-users@lists.sourceforge.net Subject: Re: [WiX-users] Installer radio buttons that disable features You probably want to use the AddLocal and Remove events. Try adding something like this inside the Control element for your Next button: <Publish Event="AddLocal" Value="A"><![CDATA[USERPICK = "A"]]></Publish> <Publish Event="Remove" Value="A"><![CDATA[USERPICK <> "A"]]></Publish> <Publish Event="AddLocal" Value="B"><![CDATA[USERPICK = "B"]]></Publish> <Publish Event="Remove" Value="B"><![CDATA[USERPICK <> "B"]]></Publish> <Publish Event="AddLocal" Value="C"><![CDATA[USERPICK = "C"]]></Publish> <Publish Event="Remove" Value="C"><![CDATA[USERPICK <> "C"]]></Publish> The AddLocal and Remove events update the list of features to be installed The text given for Value is the ID of the feature. I'm digging up old WiX code that we don't use anymore, but I suspect it should still be usable. Rob Scott Palmer wrote: > In my UI I have three options represented by radio buttons in the UI > that only are shown the first time the product is ever installed. > Call them A,B,C. The selected feature is installed and remembered in > the registry so I don't ask again if a newer version of the product is > installed. > > I wanted to use copde like this: > > <Feature Id="A" ...> > ... > <Condition Level=0">USERPICK = "A"</Condition> > </Feature> > > <Feature Id="B" ...> > ... > <Condition Level=0">USERPICK = "B"</Condition> > </Feature> > > <Feature Id="C" ...> > ... > <Condition Level=0">USERPICK = "C"</Condition> > </Feature> > > > But it seems that the decision about which feature to install is made > before the USERPICK property is changed by the UI. I checked the > install log and the property is being changed from the default to the > user's selection, but it is always the default selection that gets > installed. > >>From scanning this list, it seems that this may be caused by > CostFinalize running before the UI has changed the property. Is that > right? > If so, how can I fix it. I use Orca to take a look at the > InstallUISequence and CostFinalize is scheduled at 1000 and the > WelcomeDlg and ProgressDlg are scheduled Before="ExecuteAction". If > I try to put a <CostFinalize> in the <InstallUISequence> I don't have > "Before" or "After" options, only "Sequence". There seems to be no > way to get it to run after the dialogs because when I try I get: > > 2>C:\delivery\Dev\wix30_public\src\ext\UIExtension\wixlib\ProgressDlg.wxs(60 ,0): > error LGHT0179: The InstallUISequence table contains an action > 'ProgressDlg' which cannot have a unique sequence number because it is > scheduled before or after action 'ExecuteAction'. There is not enough > room before or after this action to assign a unique sequence number. > Please schedule one of the actions differently so that it will be in a > position with more sequence numbers available. Please note that > sequence numbers must be an integer in the range 1 - 32767 > (inclusive). > 2>C:\delivery\Dev\wix30_public\src\ext\UIExtension\wixlib\WelcomeDlg.wxs(29, 0): > error LGHT0179: The InstallUISequence table contains an action > 'WelcomeDlg' which cannot have a unique sequence number because it is > scheduled before or after action 'ExecuteAction'. There is not enough > room before or after this action to assign a unique sequence number. > Please schedule one of the actions differently so that it will be in a > position with more sequence numbers available. Please note that > sequence numbers must be an integer in the range 1 - 32767 > (inclusive). > > What's the solution? Am I just going about this the wrong way? > > Thanks, > > Scott > > ---------------------------------------------------------------------------- -- > Come build with us! The BlackBerry(R) 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/devconference ---------------------------------------------------------------------------- -- Come build with us! The BlackBerry(R) 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/devconference _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) 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/devconference _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users