コンソールを表示するC#コンソールアプリケーションから子プロセスを作成しようとしています。私は次のように試みたが、ウィンドウは現れなかった。子プロセスウィンドウが表示されない
ProcessStartInfo = new ProcessStartInfo(name)
{
UseShellExecute = false,
RedirectStandardError = true,
RedirectStandardOutput = true,
WindowStyle = ProcessWindowStyle.Maximized,
CreateNoWindow = false,
ErrorDialog = false
};
if (args != null)
{
ProcessStartInfo.Arguments = args;
}
if (workingDirectory != null)
{
ProcessStartInfo.WorkingDirectory = workingDirectory;
}
Process = new Process {EnableRaisingEvents = true, StartInfo = ProcessStartInfo};
Process.Start();
'name'、' args'、 'workingDirectory'の値は何ですか? – mjwills
名前は、このディスカッションの子コンソールアプリケーション(MyApp.exe)の名前です。作業中のworkingDirectoryが両方ともnullです。 –