Agreed. Laid out that way, INSTALLLEVEL and the rest of the machinery will work correctly.
-- John Merryweather Cooper Senior Software Engineer | Enterprise Service Applications | Continuing Development Jack Henry & Associates, Inc.® | Lenexa, KS 66214 | Ext: 431050 |jocoo...@jackhenry.com -----Original Message----- From: Hoover, Jacob [mailto:jacob.hoo...@greenheck.com] Sent: Friday, February 13, 2015 5:04 PM To: General discussion about the WiX toolset. Subject: Re: [WiX-users] Using a WiX Selection Tree control, when I select Feature 1, I want Feature 2 to be selected automatically Shouldn't it be [-] All Features [x] Feature 1 (requires Feature 2) [x] Feature 2 [x] Feature 3 And <Feature Id="ProductFeature" Title="All Features" Display="expand" Level="1"> <Feature Id="Feature1" ConfigurableDirectory="APPLICATIONFOLDER" Title="Feature 1 (requires Feature 2)" Level="1"> <ComponentRef Id="file1.txt" /> <Feature Id="Feature2" ConfigurableDirectory="APPLICATIONFOLDER" Title="Feature 2" Level="1"> <ComponentRef Id="file2.txt" /> <Condition Level="1">MsiSelectionTreeSelectedFeature="Feature1"</Condition> </Feature> </Feature> <Feature Id="Feature3" ConfigurableDirectory="APPLICATIONFOLDER" Title="Feature 3" Level="2"> <ComponentRef Id="file3.txt" /> </Feature> </Feature> (Not certain on the need/usage for Feature/@Level here.) -----Original Message----- From: Gary Henry [mailto:gary.he...@microfocus.com] Sent: Friday, February 13, 2015 4:28 PM To: wix-users@lists.sourceforge.net Subject: [WiX-users] Using a WiX Selection Tree control, when I select Feature 1, I want Feature 2 to be selected automatically I have three features in a Selection Tree control. I would like Feature 2 and 3 to be independently selected and installed but if Feature 1 is selected to be installed I want Feature 2 to be automatically selected since Feature 1 depends on it. When my Selection Tree is displayed I see: [-] All Features [x] Feature 1 (requires Feature 2) [x] Feature 2 [x] Feature 3 Where [-] represents the icon for "Will be installed on local hard drive" and [x] represents the icon for "Entire feature will be unavailable". When I select Feature 1 to be installed I see: [-] All Features [-] Feature 1 (requires Feature 2) [x] Feature 2 [x] Feature 3 But when I select Feature 1, I want Feature 2 to be selected automatically so it would look like this: [-] All Features [-] Feature 1 (requires Feature 2) [-] Feature 2 [x] Feature 3 I don't want Feature 3 to be automatically selected since it is not required by Feature 1. Is there a way to do this? This seems like a simple problem but I could not find any documentation or examples on how to do this. I have tried to use a condition within Feature2 like the following but the condition never gets tested since only Feature 1 was selected: <Feature Id="ProductFeature" Title="All Features" Display="expand" Level="1"> <Feature Id="Feature1" ConfigurableDirectory="APPLICATIONFOLDER" Title="Feature 1 (requires Feature 2)" Level="2"> <ComponentRef Id="file1.txt" /> </Feature> <Feature Id="Feature2" ConfigurableDirectory="APPLICATIONFOLDER" Title="Feature 2" Level="2"> <ComponentRef Id="file2.txt" /> <Condition Level="1">MsiSelectionTreeSelectedFeature="Feature1"</Condition> </Feature> <Feature Id="Feature3" ConfigurableDirectory="APPLICATIONFOLDER" Title="Feature 3" Level="2"> <ComponentRef Id="file3.txt" /> </Feature> </Feature> If only Feature 1 is selected, is there a way to "tell it" to set the Level attribute of Feature2 to 1 so that Feature 2 in the Selection Tree displays the icon showing it will be installed also? If trying to set the Level attribute of Feature2 is not the right approach, is there another method I can use to accomplish the behavior I desire? Here is my full program if you want to try it: <?xml version="1.0" encoding="UTF-8"?> <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> <Product Id="41788c15-290e-426f-934e-e5b3bf875013" Name="WixUI_FeatureTree" Language="1033" Version="1.0.0.0" Manufacturer="WixUI_FeatureTree" UpgradeCode="5f5d4f80-96f5-4060-a718-539b547d8a29"> <Package InstallerVersion="200" Compressed="yes" /> <Media Id="1" Cabinet="media1.cab" EmbedCab="yes" /> <?define FeatureTree=1?> <UIRef Id="MyWixUI_FeatureTree" /> <Directory Id="TARGETDIR" Name="SourceDir"> <Directory Id="ProgramFilesFolder"> <Directory Id="APPLICATIONFOLDER" Name="WixUI_FeatureTree"> </Directory> </Directory> </Directory> <DirectoryRef Id="APPLICATIONFOLDER"> <Component Id="file1.txt" Guid="FEBD6C0C-1BDF-413C-B7B1-A4E18AC7A6FA"> <File Id="file1.txt" Source="file1.txt" KeyPath="yes" Checksum="yes"/> </Component> <Component Id="file2.txt" Guid="FEBD6C0C-1BDF-413C-B7B1-A4E18AC7A6FB"> <File Id="file2.txt" Source="file2.txt" KeyPath="yes" Checksum="yes"/> </Component> <Component Id="file3.txt" Guid="FEBD6C0C-1BDF-413C-B7B1-A4E18AC7A6FC"> <File Id="file3.txt" Source="file3.txt" KeyPath="yes" Checksum="yes"/> </Component> </DirectoryRef> <Feature Id="ProductFeature" Title="All Features" Display="expand" Level="1"> <Feature Id="Feature1" ConfigurableDirectory="APPLICATIONFOLDER" Title="Feature 1 (requires Feature 2)" Level="2"> <ComponentRef Id="file1.txt" /> </Feature> <Feature Id="Feature2" ConfigurableDirectory="APPLICATIONFOLDER" Title="Feature 2" Level="2"> <ComponentRef Id="file2.txt" /> <Condition Level="1">MsiSelectionTreeSelectedFeature="Feature1"</Condition> </Feature> <Feature Id="Feature3" ConfigurableDirectory="APPLICATIONFOLDER" Title="Feature 3" Level="2"> <ComponentRef Id="file3.txt" /> </Feature> </Feature> </Product> </Wix> Please consider the environment before printing this e-mail. This message has been scanned for malware by Websense. www.websense.com ------------------------------------------------------------------------------ Dive into the World of Parallel Programming. The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------------ Dive into the World of Parallel Programming. The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users NOTICE: This electronic mail message and any files transmitted with it are intended exclusively for the individual or entity to which it is addressed. The message, together with any attachment, may contain confidential and/or privileged information. Any unauthorized review, use, printing, saving, copying, disclosure or distribution is strictly prohibited. If you have received this message in error, please immediately advise the sender by reply email and delete all copies. ------------------------------------------------------------------------------ Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration & more Get technology previously reserved for billion-dollar corporations, FREE http://pubads.g.doubleclick.net/gampad/clk?id=190641631&iu=/4140/ostg.clktrk _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users