콘솔을 표시하는 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입니다. –