Rrun C# Window Application from DOS

  • Thread starter Thread starter tapaks
  • Start date Start date
T

tapaks

Hi,

I have a C# window application, and I would like to run this program
from DOS. Does anyone know how to trigger the window application, and
then close the program after it runs?

Thanks
 
Must it be a window application? What does it do? Why can't it close
itself? Why don't you know how to execute a program from DOS?

Chris.
 
tapaks said:
I have a C# window application, and I would like to run this
program from DOS. Does anyone know how to trigger the
window application,

When you say DOS, do you really mean DOS? (As in the 16-bit operating
system that was such a big success for Microsoft in the 1980s.) Or do you
mean a command prompt?

People often confuse the two, often with unhelpful results:

http://www.interact-sw.co.uk/iangblog/2004/03/04/notdos

Assuming for the moment that you actually mean a command prompt, you can
launch any Windows application by simply typing in the name of the
executable. If you are not in the same directory as the app and it's not on
your path, you need to type in the path. So this kind of thing:

c:\MyApp\MyApp.exe

typed in at the prompt will do the trick.

and then close the program after it runs?

After it runs? That implies that it has already closed. If it hasn't
closed, it's still running. Could you clarify what you mean here? Is the
issue that the program continues to run after it has done whatever you need
it to do, and you want to make it exit at that point?
 
Back
Top