Sign in to follow this  
Followers 0
graydwarf

ProcessClose appears to close all processes with the given name

3 posts in this topic

Passing in iexplore.exe to this script will close all instances of iexplore.

If $CmdLine[0] = 0 Or $CmdLine[0] > 1 Then Exit (-1) ; This script requires exactly 1 argument
ProcessClose($CmdLine[1])
Exit @error

Based on the documentation which reads:

"If multiple processes have the same name, the one with the highest PID is terminated--regardless of how recently the process was spawned."

My expectation given that comment is that only one process will exit and it's the one with the highest PID.

What am I missing?

Share this post


Link to post
Share on other sites



The iexplore.exe process closes its child processes when it exists.

iexplore.exe <-- Kill this, it kills the rest

- iexplore.exe

- iexplore.exe

- iexplore.exe

1 person likes this

Share this post


Link to post
Share on other sites

Same thing with chrome.exe. You just have to kill one to close 'em all.

Share this post


Link to post
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
Sign in to follow this  
Followers 0