T
ThomasG
Hi,
i've got a main (win-)application which starts a consoleapp to do some work:
Dim psi As New ProcessStartInfo
psi.UseShellExecute = False
psi.CreateNoWindow = True
psi.RedirectStandardInput = True
psi.RedirectStandardError = True
psi.RedirectStandardOutput = True
psi.FileName = "C:\SomeExe.exe"
psi.Arguments = ""
' start process
_proc = Process.Start(psi)
I'm able to send something to the standardinput of this app:
'_proc.StandardInput.WriteLine("blah")
'_proc.StandardInput.Flush()
My problem is to send Ctrl-C. This is necessary to shutdown this app.
Just killing the process etc. is not possible (dataloss...).
Maybe someone has an idea or some lines of code how to manage this?
Thomas
i've got a main (win-)application which starts a consoleapp to do some work:
Dim psi As New ProcessStartInfo
psi.UseShellExecute = False
psi.CreateNoWindow = True
psi.RedirectStandardInput = True
psi.RedirectStandardError = True
psi.RedirectStandardOutput = True
psi.FileName = "C:\SomeExe.exe"
psi.Arguments = ""
' start process
_proc = Process.Start(psi)
I'm able to send something to the standardinput of this app:
'_proc.StandardInput.WriteLine("blah")
'_proc.StandardInput.Flush()
My problem is to send Ctrl-C. This is necessary to shutdown this app.
Just killing the process etc. is not possible (dataloss...).
Maybe someone has an idea or some lines of code how to manage this?
Thomas