cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
borhunt
Level 3

CA needs supporting Dll present to execute

I have a MSI custom action that uses a Dll in the binary table. This Dll needs a supporting Dll. If I copy the supporting Dll into the System folder by hand and run the installer, it works fine.

I have tried to have the supporting Dll in the binary table, that does not work. I tried putting the supporting Dll in the Support folder. It gets put into a temp folder but it does not help.

I cannot seem to find where the Dll from the binary table gets extracted to. At the point where my VB Script attempts to call this Dll, I search the entire disk for this file and cannot find it. So either it does not get extracted from the binary table or it gets extracted from the binary table to a different name (why ?).

I end up with three temp folders (with GUID names) in the user's Temp folder. One of these temp folders has the supporting files. One has the msi and the splash bmp and associated files. The third has misc stuff. None have the Binary table Dll.

How do I get the Binary Table Dll and the supporting Dll into the same folder ? Or get the supporting Dll into the System folder?

I really need to resolve this quickly.
Labels (1)
0 Kudos
(3) Replies
Ajay_Ladsaria
Level 7

Hi,

Windows Installer extracts the DLL out to the System folder (next to msiexec.exe) when executing a DLL custom action where the DLL is stored in the binary table. I believe the name of the extracted file is given a newly generated name and may end with .tmp.

Instead of using the "stored in binary table" option, you may want to consider using the "installed with the product" option. This option is usually less preferred because the DLL will actually become installed and remain after the install is finished. Also, you would need to condition the custom action so that it would only run if the component containing the DLL was being installed locally or was currently installed.

-Ajay
0 Kudos
Christopher_Pai
Level 16

Most of that is true only it doesn't extract it to System it extracts it to temp.

MSI type 1's can only extract 1 file. When you build DLL #1, can you just statically link DLL #2 into it? Can you use LoadLibray() to load it? If so, you could put DLL #2 in SUPPORTFILES and reference it from there.

Personally I write all of my CA's in C#/DTF these days which does a nice job of handling all of my dependencies and stuffing them inside a single self extracting single DLL for MSI to consume.
0 Kudos
borhunt
Level 3

As Christopher suggested I was able to get the required Dll to link in as a static library. Took some doing but was worth the extra work.
0 Kudos