Regarding custom action

Feb 26, 2015 at 8:43 AM
i got the below code from this site.
using System;
using System.Windows.Forms;
using WixSharp;
using Microsoft.Deployment.WindowsInstaller;
class Script
    static public void Main(string[] args)
        var project = new Project("CustomActionTest",
                          new Dir(@"%ProgramFiles%\My Company\My Product",
                              new DirFiles(@"Release\Bin\*.*")),
                          new ManagedAction("MyAction"));


public class CustomActions
    public static ActionResult MyAction(Session session)
        MessageBox.Show("Hello World!", "Embedded Managed CA");
        session.Log("Begin MyAction Hello World");
        return ActionResult.Success;
my question is how wix will know the MyAction reside in CustomActions class ?

because my custom action class name could be different. so please help me to understand how wix will determine where is my custom action method name ? where to declare ?

can i give different name for Custom Actions class instead of __CustomActions __ ?
Mar 12, 2015 at 8:25 AM
Sorry for the delay, I was on holidays :)

WiX SDK uses the CustomAction attribute. Thus it can be any method of any class as long as it is public , static and marked with [CustomAction]