Jump to content

ProcessClose appears to close all processes with the given name


Recommended Posts

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?

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...