• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

running a batch file from a command window launched from a c sharp program

#1
I have been able to launch a batch file from a C# program in a number of ways.

Duncan Mackenzie's blog on msdn shows a number of ways how it can be done and I have tried them. (http://blogs.msdn.com/csharpfaq/archive/2004/06/01/146375.aspx).

But I have a unique problem. The batch file launches a program that seems to require that a command window (cmd) be open when it runs. Because of this, the batch file works if I launch it from a command line, but when I launch it in a C# program, an exception is thrown.

So my question is this. How can I open a cmd window from C# and feed it the command to run the batch routine?
 

Members online

No members online now.

Latest posts

Latest profile posts

Hello, is there anybody in there? Just nod if you can hear me ...
Xie
What a long strange trip it's been. =)

Forum statistics

Threads
61,961
Messages
673,239
Members
89,014
Latest member
sanoravies