views:

716

answers:

1

So, I'm trying to, after an application finishes installing (though in truth, it really doesn't matter when the secondary application is run, since it doesn't interact with the installed files during installation), run another program which is bundled with the application. Pertinent code (with various stuff replaced with "...":

<directory ...>
  <component ...>
  <File Id="IDINST" ... />
  </component>
</directory>
...
<CustomAction Id="IDACTION" FileKey="IDINST" ExeCommand="..." Return="ignore" />
...
<InstallExecuteSequence>
  <Custom Action="IDACTION" After="CostFinalize" />
</InstallExecuteSequence>

I checked the directory and the file was where I expected, but it was not executed after the install process. In truth I really don't even want that file to be installed, just run and then deleted. But I'll ignore that for now. Anyways, I've seen several examples of triggering actions after dialogs but since I'm currently using <UIRef Id="WixUI_Minimal" /> I don't think that's ideal.

+4  A: 

CostFinalize happens long before InstallFiles deferred action runs (that actually places the file). Thus the CustomAction is failing (because the file isn't available) silently (because Return is ignore)

You need your CustomAction scheduled at least after InstallFiles and be deferred or if the CustomAction can't run deferred then it has to be after InstallFinalize (of course, it can't cause rollback after InstallFinalize).

Rob Mensching