Jump to content

ProcessClose for a specific user


cruizzer
 Share

Recommended Posts

If you know the PID and you are an administrator, it should be possible.

__________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *

Link to comment
Share on other sites

ProcessList ( ["name"] )

If you use that to get names & pids, don't you have enough information then? Or am I misreading your intentions?

No and yes... there are many processes with the same name. I want to close the process of a specific (current) user.

That's my way:

$KillCmd = 'taskkill /F /FI "USERNAME eq %USERDOMAIN%\%USERNAME%" /FI "IMAGENAME eq application.exe'
RunWait(@ComSpec & ' /c ' & $KillCmd, '', @SW_HIDE)

It works!

Cruizzer

Link to comment
Share on other sites

  • 2 years later...

I got roughly the same problem.

Several instances of the same process are opened for different user's. I want to kill the process for me, but not for User X.

I can only you internal commands of autoit... is there any way to read the user of a process? Something like that would be helpful...

Link to comment
Share on other sites

I got roughly the same problem.

Several instances of the same process are opened for different user's. I want to kill the process for me, but not for User X.

I can only you internal commands of autoit... is there any way to read the user of a process? Something like that would be helpful...

Not with only native functions (Excluding COM and DllCall). I'd go with what MHz suggested.
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...