Please remember that the code below comes with a Disclaimer 

 In a VS package

/// <summary>

/// This function is the callback used to execute a command when the a menu item is clicked.

/// See the Initialize method to see how the menu item is associated to this function using

/// the OleMenuCommandService service and the MenuCommand class.

/// </summary>

private void MenuItemCallback(object sender, EventArgs e)

{

IVsLaunchPad lp = GetService(typeof(SVsLaunchPad)) as IVsLaunchPad;

IVsOutputWindow ow = GetService(typeof(SVsOutputWindow)) as IVsOutputWindow;

Guid owguid = new Guid();

int exCd = ow.CreatePane(ref owguid,"temp pane", 1, 1);

IVsOutputWindowPane owp;

ow.GetPane(ref owguid, out owp);

uint exitcode = 0;

lp.ExecCommand(null, "c:\\temp\\myTempApp.exe", "c:\\temp\\",

(uint)Microsoft.VisualStudio.Shell.Interop._LAUNCHPAD_FLAGS.LPF_PipeStdoutToOutputWindow,

owp, (uint)Microsoft.VisualStudio.Shell.Interop.VSTASKCATEGORY.CAT_USER,

0,

"", null, out exitcode, null);

 

}