Jump to content

ProcessExists and ProcessClose on another user's processes


Angel
 Share

Recommended Posts

Hi,

I'd like to check if a certain process exists and if it does I'd like to kill it. The problem is that the process I want to kill belongs to the "SYSTEM" user (It is the screen saver, in particular "ssmarque.scr").

Looking at the documentation of the ProcessExists and ProcessClose functions it does not seem to be possible to look for and interact with processes that do not belong to the current user.

Is there any other way to achieve what I want (i.e. check if the screen saver is running, and if it is, kill it?).

Note that I cannot simply move the mouse to stop the screen saver, because I want to do this while I am accessing the computer through Windows Remote Desktop, and the screen saver that I'd like to kill is the one that is shown in the target machine while I am logged on remotely.

Any ideas?

Angel

Link to comment
Share on other sites

Just because you kill the screensaver doesn't mean you have access to the PC again. A better way to do it is to setup a script to move the mouse slightly every so often so the PC thinks its active.

This does not work for what I want to do, because the screen saver that I want to kill is not the one that would show on my "client" screen, but the one that will show on the "remote" (server) computer's screen. Basically, when you access a remote PC through Windows desktop sharing, the server PC's screen will show a screen saver (while you work on the client PC).

Anyway, regardless of the reason why I need to do this, I'd still like to know if there is any way to interact with a process that does not belong to the current user. Obviously, in order to be able to see other user's processes and to be able to kill them the current user would need to have the right permissions (e.g. be an Administrator). Yet, I do not know of any way I can do that with AutoIt even if I run the script as an administrator.

Is is possible at all?

Thanks,

Angel

Link to comment
Share on other sites

Hum, I'm also skeptical that this is the correct method to do what you want.

ProcessExists and ProcessClose work fine with any process for me. Granted it has to be called as an administrator.

eviltoaster, thank you for your reply.

The problem is that ProcessExists("smarquee.exe") returns 0. If I open the task manager the process "smarquee.exe" is not shown either. However, if I select the "Show other users' processes" option then I can see that a process called "smarquee.exe" is running under the "SYSTEM" user.

Therefore it seems that ProcessExists is running without the "Show other users's processes" option and I'd like to know if there is a way to change that.

If you're doing it remotely... maybe try PsKill.exe?

While I am accessing the computer remotely (through the "Remote Desktop" feature of Windows XP), the processes I run are being run locally.

Cheers,

Angel

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