Start processes in the same DOS-window

  • Thread starter Thread starter Wim
  • Start date Start date
W

Wim

From my Windows app I would like to open a DOS-window (Process.Start
("cmd", "/k");) and then run a number of processes in that DOS-window.
How can I arrange that these processes start in that DOS-window?
 
Wim,

I don't believe this is possible. At the best, you can get it to run in
another process. The reason for this is that you need to know how to hook
up to the code so that it can be run in the thread that you are executing
in. Without some way to interoperate with the executables that you want to
run (through COM interop, P/Invoke, etc, etc), there is no entry point into
these executables, except for the one that the OS uses when actually
executing in a new process.

Hope this helps.
 
Hmm.. not exactly the way you want it, but you can create a temporary text
"batch" file and run it.

-vJ
 
Back
Top