0

I'm creating a wix burn custom bootstapper application dll.

The installer neeeds to perform some validation before allowing the install to complete. To do this I use a third party dll. When I run the installer exe, I get an error that the dll is missing from my computer. I tried to package it like this:

<BootstrapperApplication SourceFile="$(var.Build.Output)MyCustomBootstrapperApplication.dll">
  <Payload Id="ThirdPartyDependencyDll" SourceFile="$(var.Build.Output)ThirdPartyDependency.dll"/>
</BootstrapperApplication>

But, that doesn't seem to work. Is there a way of creating a custom bootstrapper and packaging dependant dlls with it?

Thanks.

Scott Langham
  • 58,735
  • 39
  • 131
  • 204
  • The payload dll, ThirdPartyDependency.dll does get extracted into the same temp folder as MyCustomBootstrapperApplication.dll. But, I guess MyBurnInstaller.exe isn't finding it in that location. Perhaps MyBurnInstaller.exe dynamically loads MyCustomBootstrapperApplication.dll with it's full path, but burn isn't adding that path to the search paths it uses to resolve other dlls. It seems strange it wouldn't do that. – Scott Langham Nov 22 '13 at 10:18

1 Answers1

0

The solution I found was to switch the dll to delay link. Then, in BootstapperApplicationCreate, use AddDllDirectory to add the temp path to the process's dll search paths, and then LoadLibraryEx on it with flags specified to get it to search the modified path.

Scott Langham
  • 58,735
  • 39
  • 131
  • 204