Friday, 22 August 2014

run exe in asp.net c#

run exe in asp.net c# :

run exe in asp.net c#

aspx:cs

 public void RunEXE()

        {
            System.Diagnostics.Process process1 = new System.Diagnostics.Process();

            process1.StartInfo.UseShellExecute = true;
//Exe Name
            process1.StartInfo.FileName = @"Sample.exe";
//Path Name
            process1.StartInfo.WorkingDirectory = @"E:\vijay\Sample\Bin\";
            
            process1.Start();

            process1.WaitForExit();

            Thread.Sleep(20000);//Assume within 20 seconds it will finish processing. 
            process1.Close();
        }

No comments:

Post a Comment