T
Tenacious
I have been trying to run this program called mysqlbinlog.exe from my
main c# application using the Process class(See example below). The way
that mysqlbinlog functions is to read the first file in the command
line and pipe the results to the second file.
This works fine when actually run from a command window on XP, but when
I try to execute mysqlbinlog from the process class, mysqlbinlog runs
but does not pipe the result to the second file. Can anybody see what I
may be doing wrong here, or is there some trick that I do not know
about. Any assistance or suggestions would be very much appreciated.
private void Form1_Load(object sender, System.EventArgs e)
{
//Declare and instantiate a new process component.
System.Diagnostics.Process process1;
process1= new System.Diagnostics.Process();
process1.EnableRaisingEvents = false;
// Program file to run
string szProgFile = @"C:\Data\mysqlbinlog.exe";
// Cmd line arg to pipe results from rslog.001 to file1.txt
string strCmdLine = @"C:\Data\rslog.001 > C:\Data\file1.txt";
System.Diagnostics.Process.Start(szProgFile, strCmdLine);
process1.Close();
}
main c# application using the Process class(See example below). The way
that mysqlbinlog functions is to read the first file in the command
line and pipe the results to the second file.
This works fine when actually run from a command window on XP, but when
I try to execute mysqlbinlog from the process class, mysqlbinlog runs
but does not pipe the result to the second file. Can anybody see what I
may be doing wrong here, or is there some trick that I do not know
about. Any assistance or suggestions would be very much appreciated.
private void Form1_Load(object sender, System.EventArgs e)
{
//Declare and instantiate a new process component.
System.Diagnostics.Process process1;
process1= new System.Diagnostics.Process();
process1.EnableRaisingEvents = false;
// Program file to run
string szProgFile = @"C:\Data\mysqlbinlog.exe";
// Cmd line arg to pipe results from rslog.001 to file1.txt
string strCmdLine = @"C:\Data\rslog.001 > C:\Data\file1.txt";
System.Diagnostics.Process.Start(szProgFile, strCmdLine);
process1.Close();
}