473,386 Members | 1,708 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

How to capture console app output?

Hi,

In Win App, I used Process class to start a new console appliaction, is it
possible to capture the console output and display them in a textbox?

Thanks very much!

John
Nov 15 '05 #1
2 5374
John <jo*********@pursca.com> wrote:
In Win App, I used Process class to start a new console appliaction, is it
possible to capture the console output and display them in a textbox?


Yes - you need to redirect the output to a stream. See the
RedirectStandardOutput and RedirectStandardError properties of
ProcessStartInfo.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 15 '05 #2
Perfect! Thanks very very much!!!

John

"Jon Skeet [C# MVP]" <sk***@pobox.com> wrote in message
news:MP************************@msnews.microsoft.c om...
John <jo*********@pursca.com> wrote:
In Win App, I used Process class to start a new console appliaction, is it possible to capture the console output and display them in a textbox?


Yes - you need to redirect the output to a stream. See the
RedirectStandardOutput and RedirectStandardError properties of
ProcessStartInfo.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too

Nov 15 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Jose | last post by:
There's something for me to learn with this example, i'm sure :) Given this text: "....." and my first attempt at capture the groups: "(?:\)" RegExTest gives me what i expect: 6 captured...
7
by: thompson_38 | last post by:
I have a COM object that wraps a console application. This console app outputs strings, using tprintf statements, throughout execution. I would like to capture that output from the console app...
1
by: Anoj Kumar | last post by:
Hi Guys! How to capture output of a console based program and display it on Windows Forms applcation. Thx Anoj Kumar
9
by: Santtu Nyrhinen | last post by:
Hi, Let say that I have a function like void writeHello() { printf("Hello"); } Now I need to make an automated test fot that function. The test function returns 1 for successful and 0 for...
4
by: George Lake | last post by:
Hi, How can I capture the text output of a console app? For example, I would like to capture the outpur of "qwinsta" Thanks.
2
by: IchBin | last post by:
I have no problem doing this in Java. I am new to PHP. How do you, using a PHP script, run a windows DOS.bat file and capture all of its console for further processing? -- Thanks in Advance......
5
by: Muffin | last post by:
I am trying to capture the out put of a command line program. Let say ping or maybe better yet nslookup. I would like to launch and then capture all the output , redirect it I guess to a string...
5
by: goje | last post by:
Hello I want to capture the Output of the External Console Application in my application and also want to send commands to External Console Application from my application. Someone have some...
5
by: vasilis | last post by:
I have a list box in a site with which I capture a selected value with the onChange event using the capture_value() function (code listed below). This function passes 2 arguments, i.e., 'str' which...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.