tags:

views:

28

answers:

2

I wrote a custom action to create a scheduled task after install. I do not want the Custom Action to run when the user does not want to create the schedule task. During installation even if I select " Feature will be unAvailable" the schtask is getting created. How do i prevent the Custom Action from executing?

A: 

Add to your Install execute sequence.

A: 

You can set a condition for your CA execution:

<InstallExecuteSequence> <Custom Action="ScheduleTaskCA" After="InstallFinalize"> <![CDATA[&feature_name=3]]> </Custom> </InstallExecuteSequence>

Hope it helps.

If you want to read more about CAs conditions, you can chech the link below. Advanced Custom Action Conditions

Mario