I am using the below code to invoke exe which is there in the server. On p.start() ,console will open and close in 2 sec only. no exception is logging. exe is not getting executed.sometime i get "Object reference not set to an instance". what is the issue here?
MessageBox.Show("Excel Formatting started"); // Console.WriteLine("Formatting started " + DateTime.Now); Process p = new Process(); p.StartInfo.UseShellExecute = false; p.StartInfo.RedirectStandardOutput = true; p.StartInfo.FileName = str_Automate_ExecleFormatExePath; p.StartInfo.Arguments = '"' + strb_FilesList.ToString() + '"'; p.Start(); p.WaitForExit(); MessageBox.Show("Formatting completed");
p.StartInfo.FileName = str_Automate_ExecleFormatExePath; p.StartInfo.Arguments = '"' + strb_FilesList.ToString() + '"';
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)