WIX v4 - Triggerring custom action on feature enable

97 Views Asked by At

I would like to trigger a custom action when the user will install a feature. Let's say for example you have your main program and a Visual Redist feature, if you select to install this feature it will execute the vcredist.exe installer.

I did like this :

    <SetProperty Id="InstallVCRedist" Value="&quot;[INSTALLFOLDER]\vcredist.exe&quot;"
      Sequence="execute"
      Before="InstallVCRedist" />
    <CustomAction Id="InstallVCRedist" BinaryRef="Wix4UtilCA_X64" DllEntry="WixQuietExec64"
      Return="check" Impersonate="no" Execute="deferred" />

    <InstallExecuteSequence>
      <Custom Action="InstallVCRedist" Before="InstallFinalize" Condition="Vcredist=3"/>
    </InstallExecuteSequence>

But it doesn't seem to work, if I remove the "Condition=...." it works properly, so it's problably the way I am trying to access to the Vcredist value which is wrong.

Anyone knows the good way to do that ?

Thank's in advance for your answers !

0

There are 0 best solutions below