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

New Post: Regarding custom action

$
0
0
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"));

        BuildMsi(project);
    }
} 

public class CustomActions
{
    [CustomAction]
    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 __ ?

Viewing all articles
Browse latest Browse all 1354

Trending Articles



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