|
|
![]() |
|
|
Top | #1 |
|
OSNN Addict
Joined: August 2005
Posts: 94
Reputation: 10
Power: 79 |
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/arch...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? |
|
|
|
|
|
Top | #2 |
|
Godlike!
Joined: February 2004
Location: Salisbury, Wiltshire, UK
Posts: 7,015
Blog Entries: 5
Reputation: 4137
Power: 209 |
why not just launch "cmd <path to batch file>" instead of "<path to batch file>\<batchfile>"?
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| vbscript or batch file to play audio file for user on startup | Punkrulz | Web Design & Coding | 10 | November 29th, 2006 2:48pm |
| Excel minimizes when a linked file launched | Terrahertz | Windows Desktop Systems | 4 | February 28th, 2006 11:09pm |
| Delay a Batch command | the_tazinator | Web Design & Coding | 5 | February 21st, 2004 4:06pm |
| running program/batch/link on shutdown | Shotokhaan | Windows Desktop Systems | 2 | August 29th, 2002 1:25pm |
| Running *.reg files from a batch file | a1ehouse | Windows Desktop Systems | 3 | August 4th, 2002 6:51pm |