[wix-users] Converting a C-language DLL to WiX

Hoover, Jacob Jacob.Hoover at greenheck.com
Tue Feb 4 11:30:54 PST 2020


Either location would work for storing the binary, but since WiX is going to automatically extract your CA DLL to the temp folder, I feel it would be easier to grab it from itself while it is running as opposed to going back to the installer DB and extracting it.  (Rob or Bob may have comments from experience or best practices...)

I assume all supported versions are defined when authoring, such that you are authoring the features statically, and you are just using this DLL to enable/disable features and set the directory for each to install to?

Since a user could remove an installed app without you being notified, it’s going to take some leg work for you to cache the initially detected features, and their locations.  Then you should at least be able to clean up the MSI entries based off of previous state vs current state.

-----Original Message-----
From: Sean Farrow [mailto:sean.farrow at seanfarrow.co.uk] 
Sent: Monday, February 3, 2020 3:21 AM
To: Hoover, Jacob <Jacob.Hoover at greenheck.com>
Cc: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Subject: RE: Converting a C-language DLL to WiX

Hi Jacob,

Would you add the DLL the company gave me as a resource in the custom action DLL or as a resource in the binary table of the installer?

I'd like each version of the software as a feature within the installer and then each available language within a version as a sub-feature.

The installer needs to add files to the folders indicated by the DLL and remove them on uninstall/modify/repair as required.

If the user removes the host application, I need to account for that, so would need to run checks on first install/modify/repair.

Thanks,
Sean.
-----Original Message-----
From: Hoover, Jacob [mailto:Jacob.Hoover at greenheck.com]
Sent: 01 February 2020 18:33
To: Sean Farrow <sean.farrow at seanfarrow.co.uk>
Cc: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Subject: Re: Converting a C-language DLL to WiX

I would write a custom action DLL and embed the other dll as a resource. At runtime, extract the dll and invoke the methods to harvest the data.

As for properties vs tables, that depends on what your installer needs to accomplish to install the extension and what your user experience requires.

Keep in mind the ability to install/update/remove your extension, as well as what is the behavior if they run an uninstall of the application after installing your extension.

Are you only “registering” your extension into the instances, or are you trying to lay down files in the application’s installation location?

> On Feb 1, 2020, at 7:27 AM, Sean Farrow <sean.farrow at seanfarrow.co.uk> wrote:
>
> Hi,
>
> I don't have the source for the DLL.
>
> The DLL harvests the names, versions, available UI languages and directory paths for the companies installed product.
> I'd like to be able to use the data the DLL provides to install extensions created for the app.
> My main question is; do I just write a custom action to assign properties? Or Am I best using tables where possible.
>
> Thanks,
> Sean.
>
>
>
> -----Original Message-----
> From: Hoover, Jacob [mailto:Jacob.Hoover at greenheck.com]
> Sent: 31 January 2020 16:51
> To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
> Cc: Sean Farrow <sean.farrow at seanfarrow.co.uk>
> Subject: RE: Converting a C-language DLL to WiX
>
> More context is required...  What data does the DLL harvest?  Does this DLL have any dependencies?  Do you have the source to the DLL?  What do you want your WIX Installer to do with the data?
>
> -----Original Message-----
> From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Sean Farrow via wix-users
> Sent: Friday, January 31, 2020 9:56 AM
> To: 'WiX Toolset Users Mailing List' <wix-users at lists.wixtoolset.org>
> Cc: Sean Farrow <sean.farrow at seanfarrow.co.uk>
> Subject: [wix-users] Converting a C-language DLL to WiX
>
> Hi all,
>
> I have a DLL that exports functions providing information regarding a companies installed software.
> I am attempting to convert this to something that can be used by WiX.
>
> I know table-driven code is what is recommended, but was wondering whether a property could be set to count the number of rows in a table or whether I need to write a custom action?
>
> Any help appreciated.
>
> Thanks,
> Sean.
>
>
> ____________________________________________________________________
> WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/
> NOTE: This email was received from an external source. Please use caution when opening links or attachments in the message.
>
> NOTE: This email was received from an external source. Please use caution when opening links or attachments in the message.
NOTE: This email was received from an external source. Please use caution when opening links or attachments in the message.


More information about the wix-users mailing list