467,117 Members | 1,012 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,117 developers. It's quick & easy.

getting the result from executing an exe

Is there any sample about getting the results from executing an exe using
C#?
Thanks for answering.

Aug 27 '06 #1
  • viewed: 1211
Share:
9 Replies
On Sun, 27 Aug 2006 17:54:14 +0800, <Elliotwrote:
>Is there any sample about getting the results from executing an exe using
C#?
Thanks for answering.
using System;
using System.Collections.Generic;
using System.Text;

namespace ConsoleApplication1
{
class Program
{
static int Main(string[] args)
{
int i = 1 + 2;

return i;
}
}
}
Good luck with your project,

Otis Mukinfus
http://www.arltex.com
http://www.tomchilders.com
Aug 27 '06 #2


<DIV>&quot;Otis Mukinfus&quot; &lt;ph***@emailaddress.com&gt; wrote in
message news:de********************************@4ax.com... </DIV>On Sun, 27
Aug 2006 17:54:14 +0800, <Elliotwrote:
>
>>Is there any sample about getting the results from executing an exe using
C#?
Thanks for answering.

using System;
using System.Collections.Generic;
using System.Text;

namespace ConsoleApplication1
{
class Program
{
static int Main(string[] args)
{
int i = 1 + 2;

return i;
}
}
}
Good luck with your project,

Otis Mukinfus
http://www.arltex.com
http://www.tomchilders.com
Oh, I mean there is a file, for instance, test.exe, it will dynamically
output a text. I'd like to use C# to get the text, is it possible?

Aug 27 '06 #3
On Mon, 28 Aug 2006 03:17:08 +0800, <Elliotwrote:
>

<DIV>&quot;Otis Mukinfus&quot; &lt;ph***@emailaddress.com&gt; wrote in
message news:de********************************@4ax.com... </DIV>On Sun, 27
Aug 2006 17:54:14 +0800, <Elliotwrote:
>>
>>>Is there any sample about getting the results from executing an exe using
C#?
Thanks for answering.

using System;
using System.Collections.Generic;
using System.Text;

namespace ConsoleApplication1
{
class Program
{
static int Main(string[] args)
{
int i = 1 + 2;

return i;
}
}
}
Good luck with your project,

Otis Mukinfus
http://www.arltex.com
http://www.tomchilders.com

Oh, I mean there is a file, for instance, test.exe, it will dynamically
output a text. I'd like to use C# to get the text, is it possible?
What format is the text? Is it a file? Is it a string?

Can you tell me a little more about what you are trying to do?

Good luck with your project,

Otis Mukinfus
http://www.arltex.com
http://www.tomchilders.com
Aug 27 '06 #4


<DIV>&quot;Otis Mukinfus&quot; &lt;ph***@emailaddress.com&gt; wrote in
message news:44********************************@4ax.com... </DIV>On Mon, 28
Aug 2006 03:17:08 +0800, <Elliotwrote:
>
>>

<DIV>&quot;Otis Mukinfus&quot; &lt;ph***@emailaddress.com&gt; wrote in
message news:de********************************@4ax.com... </DIV>On Sun,
27
Aug 2006 17:54:14 +0800, <Elliotwrote:
>>>
Is there any sample about getting the results from executing an exe
using
C#?
Thanks for answering.

using System;
using System.Collections.Generic;
using System.Text;

namespace ConsoleApplication1
{
class Program
{
static int Main(string[] args)
{
int i = 1 + 2;

return i;
}
}
}
Good luck with your project,

Otis Mukinfus
http://www.arltex.com
http://www.tomchilders.com

Oh, I mean there is a file, for instance, test.exe, it will dynamically
output a text. I'd like to use C# to get the text, is it possible?

What format is the text? Is it a file? Is it a string?

Can you tell me a little more about what you are trying to do?

Good luck with your project,

Otis Mukinfus
http://www.arltex.com
http://www.tomchilders.com
A text string. I just want to get the output data from a console applicaton
which i wrote before using C++.

Aug 27 '06 #5
On Mon, 28 Aug 2006 05:16:19 +0800, <Elliotwrote:
<snip>
>>>Oh, I mean there is a file, for instance, test.exe, it will dynamically
output a text. I'd like to use C# to get the text, is it possible?

What format is the text? Is it a file? Is it a string?

Can you tell me a little more about what you are trying to do?

Good luck with your project,

Otis Mukinfus
http://www.arltex.com
http://www.tomchilders.com

A text string. I just want to get the output data from a console applicaton
which i wrote before using C++.
You will probably have to run the Console application from the
System.Diagnostics.Process method and retrieve the output there.
Good luck with your project,

Otis Mukinfus
http://www.arltex.com
http://www.tomchilders.com
Aug 27 '06 #6


<DIV>&quot;Otis Mukinfus&quot; &lt;ph***@emailaddress.com&gt; wrote in
message news:98********************************@4ax.com... </DIV>On Mon, 28
Aug 2006 05:16:19 +0800, <Elliotwrote:
<snip>
>>>>Oh, I mean there is a file, for instance, test.exe, it will dynamically
output a text. I'd like to use C# to get the text, is it possible?

What format is the text? Is it a file? Is it a string?

Can you tell me a little more about what you are trying to do?

Good luck with your project,

Otis Mukinfus
http://www.arltex.com
http://www.tomchilders.com

A text string. I just want to get the output data from a console
applicaton
which i wrote before using C++.

You will probably have to run the Console application from the
System.Diagnostics.Process method and retrieve the output there.
Good luck with your project,

Otis Mukinfus
http://www.arltex.com
http://www.tomchilders.com
Can I have any example please?

Aug 27 '06 #7
On Mon, 28 Aug 2006 06:47:24 +0800, <Elliotwrote:
>

<DIV>&quot;Otis Mukinfus&quot; &lt;ph***@emailaddress.com&gt; wrote in
message news:98********************************@4ax.com... </DIV>On Mon, 28
Aug 2006 05:16:19 +0800, <Elliotwrote:
><snip>
>>>>>Oh, I mean there is a file, for instance, test.exe, it will dynamically
>output a text. I'd like to use C# to get the text, is it possible?

What format is the text? Is it a file? Is it a string?

Can you tell me a little more about what you are trying to do?

Good luck with your project,

Otis Mukinfus
http://www.arltex.com
http://www.tomchilders.com

A text string. I just want to get the output data from a console
applicaton
which i wrote before using C++.

You will probably have to run the Console application from the
System.Diagnostics.Process method and retrieve the output there.
Good luck with your project,

Otis Mukinfus
http://www.arltex.com
http://www.tomchilders.com

Can I have any example please?
yes, there is an excellent example in the help files. Type
System.Diagnostics.Process int the index.

Good luck with your project,

Otis Mukinfus
http://www.arltex.com
http://www.tomchilders.com
Aug 27 '06 #8


<DIV>&quot;Otis Mukinfus&quot; &lt;ph***@emailaddress.com&gt; wrote in
message news:9u********************************@4ax.com... </DIV>On Mon, 28
Aug 2006 06:47:24 +0800, <Elliotwrote:
>
>>

<DIV>&quot;Otis Mukinfus&quot; &lt;ph***@emailaddress.com&gt; wrote in
message news:98********************************@4ax.com... </DIV>On Mon,
28
Aug 2006 05:16:19 +0800, <Elliotwrote:
>><snip>
>>Oh, I mean there is a file, for instance, test.exe, it will
>>dynamically
>>output a text. I'd like to use C# to get the text, is it possible?
>
What format is the text? Is it a file? Is it a string?
>
Can you tell me a little more about what you are trying to do?
>
Good luck with your project,
>
Otis Mukinfus
http://www.arltex.com
http://www.tomchilders.com

A text string. I just want to get the output data from a console
applicaton
which i wrote before using C++.

You will probably have to run the Console application from the
System.Diagnostics.Process method and retrieve the output there.
Good luck with your project,

Otis Mukinfus
http://www.arltex.com
http://www.tomchilders.com

Can I have any example please?

yes, there is an excellent example in the help files. Type
System.Diagnostics.Process int the index.

Good luck with your project,

Otis Mukinfus
http://www.arltex.com
http://www.tomchilders.com
Thanks but where? Visual Studio?

Aug 28 '06 #9
On Tue, 29 Aug 2006 01:33:18 +0800, <Elliotwrote:

Open Visual Studio.

On the menu bar at the top, click Help/Help On Help

>

<DIV>&quot;Otis Mukinfus&quot; &lt;ph***@emailaddress.com&gt; wrote in
message news:9u********************************@4ax.com... </DIV>On Mon, 28
Aug 2006 06:47:24 +0800, <Elliotwrote:
>>
>>>

<DIV>&quot;Otis Mukinfus&quot; &lt;ph***@emailaddress.com&gt; wrote in
message news:98********************************@4ax.com... </DIV>On Mon,
28
Aug 2006 05:16:19 +0800, <Elliotwrote:
<snip>
>>>Oh, I mean there is a file, for instance, test.exe, it will
>>>dynamically
>>>output a text. I'd like to use C# to get the text, is it possible?
>>
>What format is the text? Is it a file? Is it a string?
>>
>Can you tell me a little more about what you are trying to do?
>>
>Good luck with your project,
>>
>Otis Mukinfus
>http://www.arltex.com
>http://www.tomchilders.com
>
>A text string. I just want to get the output data from a console
>applicaton
>which i wrote before using C++.

You will probably have to run the Console application from the
System.Diagnostics.Process method and retrieve the output there.
Good luck with your project,

Otis Mukinfus
http://www.arltex.com
http://www.tomchilders.com

Can I have any example please?

yes, there is an excellent example in the help files. Type
System.Diagnostics.Process int the index.

Good luck with your project,

Otis Mukinfus
http://www.arltex.com
http://www.tomchilders.com

Thanks but where? Visual Studio?
Good luck with your project,

Otis Mukinfus
http://www.arltex.com
http://www.tomchilders.com
Aug 28 '06 #10

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Rhiner Dan | last post: by
4 posts views Thread by Bob Bedford | last post: by
4 posts views Thread by s99999999s2003@yahoo.com | last post: by
5 posts views Thread by James Scott | last post: by
4 posts views Thread by Allan M. Bruce | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.