Can WiX run custom actions from the installed binaries just like Visual Studio Setup project does?

StackOverflow https://stackoverflow.com/questions/21886033

質問

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?

役に立ちましたか?

解決

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

他のヒント

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.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top