Quantcast
Channel: wixsharp Discussions Rss Feed
Viewing all articles
Browse latest Browse all 1354

New Post: Launching a DLL from custom action

$
0
0
If you are talking about an assembly dll then it can be done in a typical .NET way.
  • If the assembly is distributed then reference it at compile time and implement you routine as required.
  • If the assembly is the global one (GAC) then you can do the same but you don't have to distibute it.
If your dll is a native one then you apply the same logic but you will need to use Interop.

As for sample. My always preferred method is a ManagedSetup AfterInstall event, which is btw elevated :
project.AfterInstall += project_AfterInstall;
. . .
staticvoid project_AfterInstall(SetupEventArgs e)
{
    //do your stuff here
}
Though Custom Actions may not be the best choice for all cases. Depending on the nature of the failure you custom action may not be called (neither WiX native nor Wix# managed CA). Then you will need to have a process that will monitor the installation and act upon failure. The obvious candidate for this is a bootstrapper, EmbeddeUI or ExternalUI. The samples are included into the distributable package

Viewing all articles
Browse latest Browse all 1354

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>