WiX dll embedding

971 views Asked by At

I'm trying to embed a .dll into a wix installer that is used by other dlls during the install but will not be installed onto the customer's systems.

I've currently got

<Binary Id="AutomationUtils" SourceFile="AutomationUtils\bin\Release\AutomationUtils.dll" />
...
<CustomAction Id="Install" BinaryKey="InstallUILib" DllEntry="AutomationUtils;RunInstallerDLL" Return="check" Execute="deferred" />

but even if I take the other .dll out - WiX refuses to acknowledge the existance of the AutomationUtils .. even though it builds ok (but falls over when you try and run it).

1

There are 1 answers

5
Rob Mensching On BEST ANSWER

The BinaryKey='InstallUILib' will refer to a Binary element with Id='InstallUILib'. The CustomAction/@DllEntry attribute is the name of the function entry point into the custom action .dll in the Binary element. That name needs that ::GetProcAddress() can access. I'm pretty sure a function named AutomationUtils;RunInstallerDLL is not valid.

If you're looking to do managed code custom action (where you probably need multiple .dlls) this article is okay. Otherwise, if you're creating a native custom action, I recommend creating a single .dll.