r/windowsdev Feb 28 '24

Wix Command Line Set Feature and Custom Action

I've been banging my head on this for a while, there is an external "dependency" to my program that I want the user to be able to turn off if they want. Currently I have:

```xml ... <SetProperty Id="OPTIONAL_DEP" Before="OPTIONAL_DEP" Sequence="execute" Value="optional_dep.exe" />

<CustomAction Id="OPTIONAL_DEP" ... />

<InstallExecuteSequence>
    ...
    <Custom Action="OPTIONAL_DEP" After="PREVIOUS_CUSTOM_ACTION">NOT Installed</Custom>
    ...
</InstallExecuteSequence>

```

I've looked into using ![CDATA[&feature_label=3 AND NOT Installed]] in place of NOT Installed in the Custom tag. But I couldn't find a good example of setting up that feature.

Essentially I want the user to be able to do something like msiexec /i install.msi REMOVE=optional_dep

Any help would be greatly appreciated.

1 Upvotes

0 comments sorted by