title: Wix a pushbutton to copy a text into clipboard, use custom action, not working
body: <p>I'm learning the Wix to build a installer.</p>
  
  <p>in a custom Dialog, I have a Control, which type is Text, and I have a Button.
  I want to click the Button to copy the Text into the Clipboard.</p>
  
  <p>Here are the codes.
  First is the Controls.</p>
  
  <pre><code>&lt;Control Id="AboutUsInfo" Type="Text" Property="AboutUsText"
                       X="150" Y="20" Width="140" Height="150"&gt;
                  &lt;Text SourceFile="sample\info2.txt" /&gt;
              &lt;/Control&gt;
  &lt;Control Id="CopyAboutUsButton" Type="PushButton" Text="Copy to the clipboard"
                       X="100" Y="180" Width="80" Height="17"&gt;
                  &lt;Publish Event="DoAction" Value="CopyAboutUsAction"&gt;&lt;/Publish&gt;
              &lt;/Control&gt;
  
  &lt;Binary Id="Customactions" SourceFile="sample\CustomAction1.CA.dll"&gt;&lt;/Binary&gt;
  </code></pre>
  
  <p>Here is the CustomAction.</p>
  
  <pre><code>    &lt;CustomAction Id="CopyAboutUsAction" BinaryKey="Customactions" DllEntry="CopyToClipboard" Return="ignore"&gt;
      &lt;/CustomAction&gt;
  </code></pre>
  
  <p>Now the C# code</p>
  
  <pre><code>namespace CustomAction1
  {
  public class CustomActions
  {
      [CustomAction]
      public static ActionResult CopyToClipboard(Session session)
      {
          session.Log("Begin Copy");
          String s=session["AboutUsText"];
          Clipboard.SetText("this is copy");
          return ActionResult.Success;
      }
  }
  }
  </code></pre>
  
  <p>The Problem is, each time I click the button, my installer says nothing. And nothing happens in my Clipboard.
  How can I make this work?</p>