Hi Pally,

                  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? 

<Feature Id="SWUSchedTaskFeature" Title="Create a scheduled task" Level="5" 
Absent="allow"               
               Description="Creates and configures Scheduled Task for the SWU 
application" 
               Display="expand" 
               AllowAdvertise="no"> 
        <ComponentRef Id='MainExecutable'/> 
        
      </Feature>           
      
    </Feature> 

    <CustomAction 
     Id="CreateScheduledTask" 
     Return="check" 
     Directory="SystemFolder" 
     ExeCommand= '[SystemFolder]schtasks.exe /create /tn 
ContinentalSystemWideUpgrade /tr "[INSTALLDIR]Swu.exe -a eligible" /sc daily 
/st 22:30 /RU NAM\svcarcclsbatch /RP no1targ1M' 
     Execute= "immediate"/> 

    <CustomAction 
    Id="RemoveScheduledTask" 
    Return="ignore" 
    Directory="SystemFolder" 
    ExeCommand= "[SystemFolder]schtasks.exe /delete /tn 
ContinentalSystemWideUpgrade /F " 
    Execute= "immediate"/> 

    <InstallExecuteSequence> 
      <Custom Action="CreateScheduledTask" Before="InstallFinalize">Not 
Installed</Custom> 
      <Custom Action="RemoveScheduledTask" 
Before="RemoveFiles">Installed</Custom> 
    </InstallExecuteSequence>

 
                                          
_________________________________________________________________
Hotmail is redefining busy with tools for the New Busy. Get more from your 
inbox.
http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_2
------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to