title: Execute MSI package in a custom Burn Bootstrapper Application
body: <p>I am bundling a MSI package with the .NET 4.0 framework installer in Burn. Since i do not like the userinterface Burn applies, i have written my own custom Bootstrapper Application. The .NET framework is installed correctly, if it is not already installed. But i can not figure out how to install the MSI package. This is the code i have for my custom BA, i have checked that it gets executed.</p>
  
  <pre><code>public class ShopProtectBA : BootstrapperApplication
  {
      protected override void Run()
      {
  
          //Here i would like to run the bundled MSI package.
          Engine.Quit(0);
      } 
  }
  </code></pre>
  
  <p>The documentation on this is sparse. Should i not install the package in Run() ? How do this ting work?</p>
  
  <p>Edit: I forgot to mention that is is a custom Managed Bootstrapper Application. If it makes any difference. </p>
  
  <p>The best i can come up with is this:</p>
  
  <pre><code>            var pl = new PlanMsiFeatureEventArgs("MyMsiPackage", "Complete", FeatureState.Local);
          Engine.Detect();
          OnPlanMsiFeature(pl);
  
          Engine.Plan(LaunchAction.Install);
  
          Engine.Elevate(FindWindow(null, "Setup"));
          Engine.Apply(FindWindow(null, "Setup"));
  </code></pre>
  
  <p>But it results only in a window telling me that the installation is prepared. Then i closes and nothing more happends.</p>