This code will show you how to run a executable file(.exe) on a button click.With this code you can run all .exe file on your Webpage. // 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("abc.exe"); //Argement Which you have tp pass. process1.StartInfo.Arguments = " "; process1.StartInfo.LoadUserProfile = true; //Process Start on exe. process1.Start(); process1.WaitForExit(); process1.Close();
Here you can find solution of your code problem & errors.