This should do <InstallExecuteSequence> <Custom Action="DBInstall" Before="InstallFinalize" >(&DB_FEAT=3) AND NOT(!DB_FEAT=3)</Custom> </InstallExecuteSequence>
Cheers Rohit -----Original Message----- From: Miller, Nick (GE Intelligent Platforms) [mailto:nick.mil...@ge.com] Sent: Tuesday, November 06, 2012 7:53 PM To: wix-users@lists.sourceforge.net Subject: [WiX-users] How to use FeaturesDlg I have 2 features. One installs and configures a service. The other installs the database components. The database components are optional. So I try to use FeaturesDlg from Wix to collect whether or not to install the feature. This would work, except I also have a CustomAction that should run only if the database components are installed. How can I put a condition in the CustomAction so it won't execute if the Feature was deselected in the FeaturesDlg. Here's an abbreviation of the .wxs code. <!--Define 2 features in the Product --> <Feature Id="SERVICE_FEAT" Title="Service" Level="1"> <ComponentGroupRef Id="ServiceComponents" /> </Feature> <Feature Id="DB_FEAT" Title="Database" Level ="1"> <ComponentGroupRef Id="DB_Components"/> </Feature> <!-Some Properties to use in the condition. How do I set these using FeaturesDlg? Is there a better way? --> <Property Id="INSTALL_DB_FEAT" Hidden="no">YES</Property> <Property Id="INSTALL_SERVICE_FEAT" Hidden="no">YES</Property> <!-CustomAction to run exe installed by DB_FEAT ->> <CustomAction Id="DBInstall" FileKey="DB_EXE" ExeCommand="-a" Execute="deferred" Return="check" Impersonate="yes"/> <!--Add action to InstallExecuteSequence with condition <InstallExecuteSequence> <Custom Action="DBInstall" Before="InstallFinalize" >NOT Installed AND INSTALL_DB_FEAT = "YES"</Custom> </InstallExecuteSequence> <!-- add reference to the FeaturesDlg in the Wix UI lib --> <DialogRef Id="FeaturesDlg"/> <Publish Dialog="WelcomeDlg" Control="Next" Event="NewDialog" Value=" FeaturesDlg ">NOT Installed</Publish> <Publish Dialog="FeaturesDlg" Control="Back" Event="NewDialog" Value="WelcomeDlg">NOT Installed</Publish> <Publish Dialog="FeaturesDlg" Control="Install" Property="INSTALL_AEDB" Value="AEDB_FEAT"></Publish> < <Publish Dialog="FeaturesDlg" Control="Install" Event="NewDialog" Value="VerifyReadyDlg">NOT Installed</Publish> <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value=" FeaturesDlg ">NOT Installed </Publish> ------------------------------------------------------------------------------ LogMeIn Central: Instant, anywhere, Remote PC access and management. Stay in control, update software, and manage PCs from one command center Diagnose problems and improve visibility into emerging IT issues Automate, monitor and manage. Do more in less time with Central http://p.sf.net/sfu/logmein12331_d2d _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------------ LogMeIn Central: Instant, anywhere, Remote PC access and management. Stay in control, update software, and manage PCs from one command center Diagnose problems and improve visibility into emerging IT issues Automate, monitor and manage. Do more in less time with Central http://p.sf.net/sfu/logmein12331_d2d _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users