Question

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?

Was it helpful?

Solution

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" />

OTHER TIPS

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.

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top