Sign in to follow this  
Followers 0
cruizzer

ProcessClose for a specific user

11 posts in this topic

Hi

Is there a way to use ProcessClose to kill an application of a specific user (on Citrix Server)?

Cruizzer

(Sorry for my bad english)

Share this post


Link to post
Share on other sites



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 *

Share this post


Link to post
Share on other sites

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

Yeah, thats right, but how can i get the PID of the user-application? ProcessList or something else don't returns a user-specific information....

Cruizzer

Share this post


Link to post
Share on other sites

Do you know what's it called in the the proces tab of Ctrl Alt Del.. If so I think you can use that


Start here if you are new Valuater's AutoIT 1-2-3Looking for an UDF - Look hereDo you need to do it twice - Autoit

Share this post


Link to post
Share on other sites

Hi

Better solution without external tools: the build-in command TASKLIST shows the needed informations.

Maybe that's helpful for others.

Cruizzer

Share this post


Link to post
Share on other sites

WMI can get the owner of a process. Search for Scriptomatic in the forums by SvenP. Not sure if the name maybe separated by dashes in spelling. :whistle:

Share this post


Link to post
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?


Roses are FF0000, violets are 0000FF... All my base are belong to you.

Share this post


Link to post
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

Share this post


Link to post
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...

Share this post


Link to post
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.

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