Wix Custom Action problems

Posted by Grandpappy on Stack Overflow See other posts from Stack Overflow or by Grandpappy
Published on 2010-04-07T15:19:57Z Indexed on 2010/04/07 15:23 UTC
Read the original article Hit count: 859

Filed under:

I'm trying to create a custom action for my Wix install, and it's just not working, and I'm unsure why.

Here's the bit in the appropriate Wix File:

<Binary Id="INSTALLERHELPER" SourceFile=".\Lib\InstallerHelper.dll" />
<CustomAction Id="SQLHelperAction" BinaryKey="INSTALLERHELPER" DllEntry="CustomAction1" Execute="immediate" />

Here's the full class file for my custom action:

using Microsoft.Deployment.WindowsInstaller;

namespace InstallerHelper
{
  public class CustomActions
  {
    [CustomAction]
    public static ActionResult CustomAction1(Session session)
    {
      session.Log("Begin CustomAction1");

      return ActionResult.Success;
    }
  }
}

When I run the MSI, I get this error in the log:

MSI (c) (08:5C) [10:08:36:978]: Connected to service for CA interface.
MSI (c) (08:4C) [10:08:37:030]: Note: 1: 1723 2: SQLHelperAction 3: CustomAction1 4: C:\Users\NATHAN~1.TYL\AppData\Local\Temp\MSI684F.tmp 
Error 1723. There is a problem with this Windows Installer package. A DLL required for this install to complete could not be run. Contact your support personnel or package vendor.  Action SQLHelperAction, entry: CustomAction1, library: C:\Users\NATHAN~1.TYL\AppData\Local\Temp\MSI684F.tmp 
MSI (c) (08:4C) [10:08:38:501]: Product: SessionWorks :: Judge Edition -- Error 1723. There is a problem with this Windows Installer package. A DLL required for this install to complete could not be run. Contact your support personnel or package vendor.  Action SQLHelperAction, entry: CustomAction1, library: C:\Users\NATHAN~1.TYL\AppData\Local\Temp\MSI684F.tmp 

Action ended 10:08:38: SQLHelperAction. Return value 3.
DEBUG: Error 2896:  Executing action SQLHelperAction failed.
The installer has encountered an unexpected error installing this package. This may indicate a problem with this package. The error code is 2896. The arguments are: SQLHelperAction, , 

Neither of the two error codes or messages it gives me is enough to tell me what's wrong. Or perhaps I'm just not understanding what they're saying is wrong.

Any ideas on what I'm doing wrong?

© Stack Overflow or respective owner

Related posts about wix