Linked Questions
64 questions linked to/from Capturing console output from a .NET application (C#)
179
votes
9
answers
162k
views
How to spawn a process and capture its STDOUT in .NET? [duplicate]
I need to spawn a child process that is a console application, and capture its output.
I wrote up the following code for a method:
string retMessage = String.Empty;
ProcessStartInfo startInfo = new ...
1
vote
4
answers
5k
views
How to take the output of a BAT file and save it to a string [duplicate]
I have a BAT file that I am running using the following code:
@ECHO ON
java com.mypackage.test send
which result in this:
C:\myfolder>java com.mypackage.test send
EXEC Sending...
Received 1 ...
0
votes
1
answer
361
views
command prompt c# [duplicate]
Possible Duplicate:
Redirect Standard Output Efficiently in .NET
Capturing console output from a .NET application (C#)
I know how to execute something like this:
SomeEXE inputfile.txt
in the ...
0
votes
0
answers
43
views
Execute windows cmd prompt command through c# code. [duplicate]
I want to execute any sample command of cmd.exe through c# code. Eg. Time/ver this command i want to execute through c# code.
1. By opening cmd.exe and execute.
2. by hiding cmd.exe and get the cmd ...
419
votes
10
answers
448k
views
Process.start: how to get the output?
I would like to run an external command line program from my Mono/.NET app.
For example, I would like to run mencoder. Is it possible:
To get the command line shell output, and write it on my text ...
11
votes
4
answers
18k
views
Read values already printed to the console
This may be completely impossible, but I was wondering if there is a way to read values that the console has already printed. For example, if the console printed
You are travelling north at a speed ...
20
votes
6
answers
8k
views
Capture output of process synchronously (i.e. "when it happens")
I am trying to start a process and capture the output, have come a far way, but am not quite at the solution I'd want.
Specifically, I am trying to reset the IIS on my development machine from a ...
6
votes
3
answers
18k
views
How to get the video duration using FFMPEG in C# asp.net
I want to get the video file duration in string using C#. I searched the internet and all i get is:
ffmpeg -i inputfile.avi
And every1 say that parse the output for duration.
Here is my code which ...
8
votes
1
answer
10k
views
Redirect Console.WriteLine() output to string
I need to take Console.WriteLine() output, and append to a string. I cannot change the Main method to simply append to a string instead of writing to console - I need a method to read all written ...
5
votes
7
answers
2k
views
Is there a way to continuously mirror the result of Console.Write to a collection (array,list,etc)?
I have a console program, I'd like to continuously mirror the result of Console.Write to a collection, which I can look at the tail of in real time. The collection could be an array, a list, etc.
I ...
8
votes
1
answer
4k
views
Capture coloured console output into WPF application
Similar to this question, except the console program being wrapped up in the WPF application produces coloured output, so it would be nice if I could capture the colour as well as the text.
This is ...
3
votes
2
answers
4k
views
Capturing an c# executable output from another C# program
I am executing a C# program i.e a .exe from another C# program. but the .exe has some Console.WriteLine() in its program. I want to get the standard output into my C# program.
for example,
...
5
votes
3
answers
8k
views
How to make a C# wrapper around a console application (any language)
I'm trying to make a console application, that can wrap around pretty much any application that opens a console.
A few quick facts:
The output of the wrapped application should show in the console.
...
2
votes
5
answers
6k
views
How To Write To Console From Background Thread's Event Loop?
Is it possible to write error messages to the console from process that has been fired up? Normally we are used to using Console.Writeline() from within the console. The additional process (in ...
6
votes
2
answers
7k
views
c# run CL exe or batch cpture output LIVE to textbox?
Is it possible to run any Command Line based program or batch file and capturer (re-direct) the out put to a text box LIVE
the CL takes time and it produce text!
something like tracert.exe (it takes ...