i've got the following code which runs a bat file. the bat file then runs some .exe .. which does some stuff. The stuff takes aroun 5-10 seconds.
ProcessStartInfo start = new ProcessStartInfo
{
Arguments = """ + newTargetFile + """ +
" " +
""" + originalFile.FullName + """,
FileName = filename,
WindowStyle = ProcessWindowStyle.Normal,
CreateNoWindow = false,
UseShellExecute = false
};
// Run the external process & wait for it to finish
using (Process proc = Process.Start(start))
{
proc.WaitForExit();
}
What i'm trying to do is leave the command window open, even after the process terminates. Is there any way to do this?
Otherwise, can i get all the output of that window going to my debugger instead, so i don't need to worry about this window remaining?
cheers.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…