开发者

Add an option to enable or disable a feature during installation process using wix

Hi I have written code for my wix project such that it creates and deletes a schedule task on install or uninstall respectively. But I want to give the users an option(Feature) during installation where they enable or disable the task to get created not. My code so far s开发者_C百科hows the option but creates the task even when I select disable.


The feature level for your scheduled task is 1, your installlevel is going to be 1 or more, therefore this feature will always install. When your user selects an option it has to change the installlevel

Here is further info on features etc

here is your code in better formatting.

<Component Id='ScheduledTask' Guid='{ABDBFC55-F5DF-4DC9-92FF-DD9C7A5D4880}' KeyPath='yes'> 
    <File Source="../../apps/bin/Release/Swu.exe"></File> 
</Component> 
<Feature Id="SWUSchedTaskFeature" Title="Create a scheduled task" Level="1" Absent="allow" TypicalDefault="install" Description="Creates and configures Scheduled Task for the SWU application" Display="expand" AllowAdvertise="no">
    <ComponentRef Id="ScheduledTask"/>
</Feature>


<InstallExecuteSequence> 
<Custom Action="CreateScheduledTask" Before="InstallFinalize">
    <![CDATA[&CreateScheduledTask=3]]>
</Custom>
</InstallExecuteSequence>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜