hi everyone,
I am trying to run a batch file using asp.net
I have tried using this code:
private void ExecuteRequest()
{
string Fichier=Server.MapPath("")+"\\SearchEng\\request.bat";
Process proc=new System.Diagnostics.Process();
proc.StartInfo.WindowStyle=ProcessWindowStyle.Maximized;
proc.StartInfo.WorkingDirectory=Server.MapPath("")+"\\SearchEng\\";
proc.StartInfo.FileName=Fichier;
try
{
proc.Start();
proc.WaitForExit();
proc.Close();
}
catch(Exception ex)
{
this.lblerror.Text="error 2 "+ex.Message;
}
}