Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post May 03, 2005 11:32 AM by Qnnn
Contributor
3290 Points
658 Posts
May 03, 2005 11:32 AM|LINK
<%@ Import Namespace="System.Diagnostics" %><script runat="server" language="C#">private void Page_Load(){ string sPath = "path to my program"; ProcessStartInfo proc = new ProcessStartInfo(sPath, ""); proc.RedirectStandardOutput = true; proc.UseShellExecute = false; Process p = Process.Start(proc); p.Start(); this.lblOut.Text = p.StandardOutput.ReadToEnd(); p.Dispose();}</script><html><head> <title>Shell program output</title></head><body> <form runat="server"> <pre><asp:Label runat="server" id="lblOut"></asp:Label></pre> </form></body></html>
Qnnn
Contributor
3290 Points
658 Posts
How to catch output of shell program or any other process
May 03, 2005 11:32 AM|LINK
-- General Protection Fault
-- Illegal Page Fault
-- Not My Fault