[wix-users] Custom Action based on condition
Priyanka Kandpal
priyankak at microsystems.com
Fri Oct 28 09:27:03 PDT 2016
Hello Everyone
I am trying to execute custom action based on the feature selected in the selection tree. Could you please help me with the condition. I tried putting the feature id in the conditional statement but it didn't work.
Below is the code for the Feature
<Feature Id="Service" Title="Contract Companion Server Service" Description="Installs all the files needed for Contract Companion Server's Analysis Service" Level="1" AllowAdvertise="no" ConfigurableDirectory="SERVICE">
<ComponentGroupRef Id="ServiceProductComponents"/>
</Feature>
<Feature Id="Website" Title="Contract Companion Server Website" Description="Installs all the files needed for Contract Companion Server IIS Website" Level="1" AllowAdvertise="no" ConfigurableDirectory="WEBSITE">
<ComponentGroupRef Id="WebsiteProductComponents"/>
<ComponentRef Id="webSite" />
</Feature>
Below are my conditional statements.
<? Feature Id="Website"?>
<CustomAction Id='SetCA_RunDBUpgrade' Property='CA_RunDBUpgrade'
Value='EXE_FILE_NAME=[EXE_FILE_NAME];RUN_EXE_CMD_ARGS=[RUN_EXE_CMD_ARGS];ProductName=[ProductName];DATABASERESOURCESFOLDER=[DATABASERESOURCESFOLDER];INSTALLFOLDER=[WEBSITE];PRODUCT_FOLDER_NAME=[PRODUCT_FOLDER_NAME];UILevel=[UILevel];PRODUCT_SUBFOLDER_FOLDER_NAME=[PRODUCT_SUBFOLDER_FOLDER_NAME]'/>
<?else?>
<CustomAction Id='SetCA_RunDBUpgrade' Property='CA_RunDBUpgrade'
Value='EXE_FILE_NAME=[EXE_FILE_NAME];RUN_EXE_CMD_ARGS=[RUN_EXE_CMD_ARGS];ProductName=[ProductName];DATABASERESOURCESFOLDER=[DATABASERESOURCESFOLDER];INSTALLFOLDER=[SERVICE];PRODUCT_FOLDER_NAME=[PRODUCT_FOLDER_NAME];UILevel=[UILevel];PRODUCT_SUBFOLDER_FOLDER_NAME=[PRODUCT_SUBFOLDER_FOLDER_NAME]'/>
<?endif?>
Thanks & Regards
Priyanka Kandpal
More information about the wix-users
mailing list