私のC#アプリケーションから、次のProcessStartInfoを使用してProcess.Start(myPSI)を呼び出しています。
ProcessStartInfo startInfoSigner = new ProcessStartInfo();
startInfoSigner.CreateNoWindow = false;
startInfoSigner.UseShellExecute = false;
startInfoSigner.FileName = pathToMyEXE;
startInfoSigner.WindowStyle = ProcessWindowStyle.Hidden;
startInfoSigner.WindowStyle = ProcessWindowStyle.Minimized;
startInfoSigner.RedirectStandardOutput = true;
これにより、アプリケーションの実行時に新しいコンソールウィンドウが表示され、出力は生成されません(リダイレクトされるため)。exeプロセスの標準出力を読み取り、ファイルに書き込みます。
この新しいコンソールウィンドウに情報を表示し、それをファイルに書き込む方法はありますか(pathToMyEXE実行可能ファイルを変更せずに)?