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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top