Process in C# mit Parametern starten
-
Mahlzeit Leute.
Vielleicht kann mir jemand helfen:
Ich starte einen eigenständigen Prozess aus meiner Application:Process myProcess = new Process(); ProcessStartInfo myProcessStartInfo = new ProcessStartInfo("d:\\RandomApp.exe"); myProcessStartInfo.UseShellExecute = false; myProcessStartInfo.RedirectStandardOutput = true; myProcessStartInfo.Arguments = "/all"; myProcessStartInfo.CreateNoWindow = true; myProcess.StartInfo = myProcessStartInfo;
und möchte diesem Prozess aber beim Aufruf einen Parmater mitgeben.
ProcessStartInfo myProcessStartInfo = new ProcessStartInfo("d:\\RandomApp.exe 9");
Das klappt aber so nicht. Weiß jemand Rat ?
Michi
-
tut mir leid, ich bin zu blöd
steht ja direkt im Code
myProcessStartInfo.Arguments = "9";