We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

adamdc78
Posts: 76
Joined: Wed Mar 19, 2014 7:42 pm

C# Custom Action via WiX

I've tried to follow the steps in http://www.advancedinstaller.com/user-g ... rp-ca.html but the option “New Installed Custom Action” is not available in the Add Custom Action tab. Since it's a .dll, would I just use the Launch Installed File and provide the Custom Action name as the Function?

A search for C# Custom Action returns no results as all of the terms are filtered out as too common, so my apologies if this is a duplicate.
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: C# Custom Action via WiX

Hello,

Indeed the custom action name is outdated in the related article. We apologize for the inconvenience, the article will be updated in a future version of Advanced Installer.

To launch a C# custom action you can use the "Call function from attached native DLL" or the "Call function from installed native DLL" action type.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
adamdc78
Posts: 76
Joined: Wed Mar 19, 2014 7:42 pm

Re: C# Custom Action via WiX

Hello Daniel,

I presume, for the sake of completeness, that if it is a mixed-mode (ie: .NET) dll that standard dll would also be applicable?

EDIT: Further research led me to http://www.advancedinstaller.com/forums ... f=1&t=9443 which pointed me in the correct direction.

EDIT 2: It seems as though you cannot make a .NET Installer Class Action custom action on a Temporary File; is this deliberate? I don't want to install the .dll on the target machine with the application files as it is not part of the application's functionality. If installed in the Temporary folder (but not as a temporary file) it is not present on uninstallation (which is when I need it).

Thank you,

- Adam
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: C# Custom Action via WiX

Hi Adam,
It seems as though you cannot make a .NET Installer Class Action custom action on a Temporary File; is this deliberate?
Yes, I'm afraid this is a limitation which cannot be overcomed.

Also, please note that the a .NET installer class custom action is different from the custom action type you mentioned in the first post. The latter one is more powerful, as it gives you access to MSI handles so you can get and set installer properties directly from your code. Also this one supports being added as an attached
custom action, using the type "Call function from attached native DLL", solving the problem you encountered with the .NET Installer class custom action.

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”