Jump to content

Killing a Process Tree


Recommended Posts

Background...

I want to be able to kill an install if a certain error occurs. Now I know that other then sending commands to the buttons to exit the install correctly I can also kill the process with ProcessClose(). However, when I use ProcessClose(), the process is killed but the dailogs from the install remain open. This does not work for me....

Question....

Is there anyway to kill a process TREE with Autoit? Has anyone attempted this before?

Link to comment
Share on other sites

Background...

I want to be able to kill an install if a certain error occurs. Now I know that other then sending commands to the buttons to exit the install correctly I can also kill the process with ProcessClose(). However, when I use ProcessClose(), the process is killed but the dailogs from the install remain open. This does not work for me....

Question....

Is there anyway to kill a process TREE with Autoit? Has anyone attempted this before?

The built in windows command to kill a task is called taskkill, the /t flag indicates you want to kill the entire program tree, and the /im is for the program matching whatever name comes after it.

Run(@ComSpec & "/c taskkill /t /im program.exe", "")
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...