Monday, August 1, 2016

run exe in asp.net

// Create a Process Object here.
System.Diagnostics.Process process1 = new System.Diagnostics.Process();
//Working Directory Of .exe File.
process1.StartInfo.WorkingDirectory = Request.MapPath("~/");
//exe File Name.
process1.StartInfo.FileName = Request.MapPath("Demo.exe");
//Arguments Which you have tp pass.
process1.StartInfo.Arguments = " ";
process1.StartInfo.LoadUserProfile = true;
 //Process Start on exe.
process1.Start();
process1.WaitForExit();

process1.Close();

No comments: