0

Since I migrated to WiX I only can run custom actions from binaries that are inserted in the Binary table

<Binary Id="SetupActions.CA.dll"
        src="..\SetupActions\bin\Release\SetupActions.CA.dll" />

But Visual Studio Setup Project used to use the installed binaries as the container of custom actions.

Is there any way to use the old way in WiX?

Jader Dias
  • 217
  • 3
  • 8

3 Answers3

2

You mean that you want to run a custom action that references a function within a dll that is installed with the package? In this case use the custom action type 17. Or in WiX:

<CustomAction Id="myCAfromInstalledDLL" FileKey="IdOfFile.dll" ExeCommand="EntryPointInDll" />
taffit
  • 1,979
  • 22
  • 23
0

Something like this: CustomAction Id='FooAction' BinaryKey='FooBinary' DllEntry='FooEntryPoint' Execute='immediate' Return='check'/ Binary Id='FooBinary' SourceFile='foo.dll'

with the Xml angle brackets edited out for SO.

It's that binarykey that means it gets extracted from the Binary table to be called.

PhilDW
  • 20,260
  • 1
  • 18
  • 28
0

I suppose you could try the following:

  1. Create a custom action binary that you embed in your installer.
  2. Your custom action binary can act as a wrapper and determine the location of the installed binaries and call the appropriate methods \ custom actions. A benefit is that you can check for the existence of the files and take appropriate action if they are missing.
BryanJ
  • 8,485
  • 1
  • 42
  • 61