#region RunBatchFile
public static void RunBatchFile()
{
try
{
System.Diagnostics.Process proc;
string myBatchFilePath = System.Configuration.ConfigurationManager.AppSettings["BatchFilePath"].ToString();
proc = System.Diagnostics.Process.Start(myBatchFilePath);
proc.WaitForExit();
Email.EmailMessage("RunBatchFile finished !!! Successfully !!!");
}
catch (SqlException ex)
{
Email.EmailMessage("RunBatchFile has error !!!" + ex.ToString());
}
}
#endregion
another reference from MSDN
http://blogs.msdn.com/csharpfaq/archive/2004/06/01/146375.aspx
No comments:
Post a Comment