D
DBC User
In my c# program I need to call an old legacy program for doing data
conversion. For that I have written a code like this follows
Process proc = new Process();
proc.StartInfo.CreateNoWindow = false;
proc.StartInfo.WindowStyle = ProcessWindowStyle.Normal;
proc.StartInfo.ErrorDialog = true;
proc.StartInfo.FileName = "EditCD.exe";
proc.StartInfo.WorkingDirectory = _drive +
@":\myleg\appdir\";
proc.Start();
log.Info("Processed started & waiting for output");
proc.WaitForExit();
log.Info("Wait completed " + returnFileName);
if (!File.Exists(returnFileName))
returnFileName = null;
log.Info("Done Processing -> " + returnFileName);
When I run, I get to log info "process started & waiting for output"
but it doesn't go any further than that. The legacy program doesn't
have any window to show either. I checked the taxk panel and the legacy
program is not running. What am I doing wrong?
conversion. For that I have written a code like this follows
Process proc = new Process();
proc.StartInfo.CreateNoWindow = false;
proc.StartInfo.WindowStyle = ProcessWindowStyle.Normal;
proc.StartInfo.ErrorDialog = true;
proc.StartInfo.FileName = "EditCD.exe";
proc.StartInfo.WorkingDirectory = _drive +
@":\myleg\appdir\";
proc.Start();
log.Info("Processed started & waiting for output");
proc.WaitForExit();
log.Info("Wait completed " + returnFileName);
if (!File.Exists(returnFileName))
returnFileName = null;
log.Info("Done Processing -> " + returnFileName);
When I run, I get to log info "process started & waiting for output"
but it doesn't go any further than that. The legacy program doesn't
have any window to show either. I checked the taxk panel and the legacy
program is not running. What am I doing wrong?