How to kill a running program?

  • Thread starter Thread starter Wongalogic
  • Start date Start date
W

Wongalogic

Hi, all:

Do you know how tokill or stop process of a program? I want to kill all MS Project instance before launch a new one. How to do it?

thanks,

Dennis
 
Wongalogic said:
Do you know how tokill or stop process of a program? I want to kill
all MS Project instance before launch a new one. How to do it?

You can enumerate the processes using the 'Process' class and terminate a
process by calling its 'Kill' method.
 
Hi,

Use process.kill. Here is an example on how to kill all running word apps.

Dim prWord As Process

For Each prWord In Process.GetProcessesByName("WINWORD")

prWord.Kill()

Next

Ken

-------------------

Hi, all:

Do you know how tokill or stop process of a program? I want to kill all MS Project instance before launch a new one. How to do it?

thanks,

Dennis
 
Back
Top