Andrei Arugay

Andrei Arugay

  • NA
  • 81
  • 51k

Running Applications

Sep 26 2004 5:51 AM
I have made a program that can run any application using processes. I have this simple program: Process myProcess = new Process(); public void RunProgram(string fileName) { ProcessStartInfo myInfo = new ProcessStartInfo(fileName); myProcess.ProcesStartInfo = myInfo; //or new ProcessStartInfo(fileName); myProcess.Start(); } public void CloseProgram() { myProcess.Kill(); } What happens to my myProcess object when i run many programs? How do i know which is the current process is running? Also, how to get all the name and id processes? Is myProcess object creates a collection that stores each processes run?

Answers (3)