[wix-users] How to specify payload for wix C++ custom action ( WIX version 3.10.3.3007)

Robert Goodridge robert.goodridge at lansa.com.au
Wed Aug 10 16:35:37 PDT 2016


I believe you just want to ship a Custom Action DLL for use with your MSI. If that's the case then you first declare it as a binary object:
         <Binary Id="CustomActions.dll" SourceFile="c:\somepath\CustomActions.dll"/>
Then refer to it in a CustomAction:
      <CustomAction Id="SetInstallMode" BinaryKey="CustomActions.dll" DllEntry="SetInstallMode" Execute="immediate" Return="check"/>

And that's it.

Note that the Id and the DllEntry do not need to be the same, but we make that a standard so its easy to cross reference.

Warm regards

Rob Goodridge | CloudArchitect | LANSA Product Centre

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Hoover, Jacob
Sent: Thursday, 11 August 2016 12:56 AM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Subject: Re: [wix-users] How to specify payload for wix C++ custom action ( WIX version 3.10.3.3007)

You're going to want to embed this DLL into your MSI, so that you can support a naked install without a bundle.  Once the DLL is embedded into the MSI, you can use a custom action to extract it before invoking the CA that requires this DLL to be present.

https://blogs.msdn.microsoft.com/icumove/2009/06/23/custom-action-using-wix-reading-from-the-binary-table/

If you delay load the DLL, you should be able to extract the DLL from the MSI Binary table, and then LoadLibrary/GetProcAddress to invoke the 3rd party DLL as needed.

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of shashank khadse
Sent: Wednesday, August 10, 2016 5:07 AM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Subject: [wix-users] How to specify payload for wix C++ custom action ( WIX version 3.10.3.3007)

Hello All,
I am need to use a third party dll for execution of one of my Wix C++ custom action in msi.
I tried using the payload for MsiPackage , but those payloads are getting copied into the cached directory under the

*"C:\ProgramData\Package Cache\"*
Since the custom action are getting executed directly under the %Temp% directory
* at runtime *
as per the installer  log
"Invoking remote custom action. DLL:
C:\Users\Tom\AppData\Local\Temp\MSIE983.tmp, Entrypoint: RegisterData", the installer crashes with an error "A DLL required for this install to complete could not be run."

Does the dependent dlls also need to be copied at runtime under %temp% directory ?
The cached dlls does not seems to be picked up.

Is there any workaround for this ?

Regards
Shanky

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/


More information about the wix-users mailing list