I am still new to WiX, but maybe set each feature's level to 0 then changing them to 1 with your custom action. Then when the user gets to the customize dialogue they should be able to enable disable the feature.
--Sam On 3/24/2010 8:21 AM, Rohit Sharma (SIDC) wrote: > Hello > > > > I have a wix project where I have 2 Main features and 1 Main feature has > two sub features. I have added a dialog box which I show to the user > which takes the productkey as input from the user. The return value from > my custom action lets me know whether the Feature 1 or Feature 2 are to > be enabled. If either of them is enabled I am setting another button > i.e. BOTHFEATURES which I am using on next button new dialog. If its > false, clicking next will popup a message that Invalid product key. > > > > So here's how my custom action is returning values using dialog > (WixUI_FeatureTree): > > > > <Publish Dialog="LicenseAgreementDlg" Control="Next" Event="NewDialog" > Value="LicenseDlg">LicenseAccepted = "1"</Publish> > > <Publish Dialog="LicenseDlg" Control="Next" Event="DoAction" > Value="CustomAction1" Order="1">1</Publish> > > <Publish Dialog="LicenseDlg" Control="Next" Property="FEATURE1" > Value="[FEATURE1]" Order="2">1</Publish> > > <Publish Dialog="LicenseDlg" Control="Next" Property=" FEATURE2" > Value="[FEATURE2]" Order="3">1</Publish> > > <Publish Dialog="LicenseDlg" Control="Next" Property="BOTHFEATURES" > Value="[ BOTHFEATURES]" Order="4">1</Publish> > > <Publish Dialog="LicenseDlg" Control="Next" Event="NewDialog" > Value="CustomizeDlg" Order="5"><![CDATA[BOTHFEATURES<> > "FAILURE"]]></Publish> > > <Publish Dialog="LicenseDlg" Control="Back" Event="NewDialog" > Value="LicenseAgreementDlg">1</Publish> > > > > FEATURE1 and FEATURE2 return SUCCESS if key is validated properly. > > > > Till now it's all good but the problem is in the condition which I want > to use to enable/ disable features: > > > > <MAINFEATURE1> > > ... > > <Feature Id='Web_FEATURE1' > > Title='HELLO' > > Description='The $(var.Product.Name) Web Installer > package.' > > ConfigurableDirectory="INSTALLDIR_WEB" > > Level='0'> > > > > <Condition Level="0"><![CDATA[FEATURE1 = "SUCCESS"]]></Condition> > > <Condition Level="1"><![CDATA[FEATURE1<> > "SUCCESS"]]></Condition> > > <ComponentRef Id="comp_$(var.Company.Name).ico" /> > > .... > > > > </Feature> > > > > > > <Feature Id='Web_FEATURE2' > > Title='HELLO2' > > Description='The $(var.Product.Name) Web Installer > package.' > > ConfigurableDirectory="INSTALLDIR_WEB" > > Level='0'> > > > > <Condition Level="0"><![CDATA[FEATURE2 = "SUCCESS"]]></Condition> > > > <Condition Level="1"><![CDATA[FEATURE2<> > "SUCCESS"]]></Condition> > > <ComponentRef Id="comp_$(var.Company.Name).ico" /> > > .... > > > > </Feature> > > ... > > </MAINFEATURE1> > > > > Now the problem is that though I am checking different condition in both > features above which are independent of each other, When I add a valid > key for feature One, it also enables Feature2 for some reason even > though I have set the Level='0' by default. Not sure if I am doing > something wrong here. > > > > Any help would be appreciated. > > > > > > Thanks > > Rohit > > > > ======= > Notice: This e-mail message, together with any attachments, contains > information of Symyx Technologies, Inc. or any of its affiliates or > subsidiaries that may be confidential, proprietary, copyrighted, > privileged and/or protected work product, and is meant solely for > the intended recipient. If you are not the intended recipient, and > have received this message in error, please contact the sender > immediately, permanently delete the original and any copies of this > email and any attachments thereto. > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > WiX-users mailing list > WiX-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wix-users > ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users