Sign in to follow this  
Followers 0
gertsolo

Stopping running processes in taks manager

8 posts in this topic

#1 ·  Posted (edited)

Hey all,

I would like to automate the following. I would like to stop a certain process (that is hanging) in the task manager.

Could someone point me to the right direction in how to accomplish this?

thx.

Edited by gertsolo

The more you learn, the less you know.

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

So you want your script to auto-detect which process(es) are hung and close them? If so:

  • Go to Run and enter Regedit.
  • Browse to HKEY_CURRENT_USER\Control Panel\Desktop
  • Here you will find a string called as Auto End Task, set its value to 1 by double clicking it. This means any hung program will be killed instantaneously.
  • Now suppose if you want to give some time, as some programs come back to normal in few minutes, Find a key called as WaitToKillAppTimeout, change the value to the value you want. You have to enter value in milliseconds though.
Edited by weaponx

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Hey all,

I would like to automate the following. I would like to stop a certain process (that is hanging) in the task manager.

Could someone point me to the right direction in how to accomplish this?

thx.

I think it is in the HELP:

ProcessClose ( "process" [, flag] )
:)

Edit: Sorry if my suggestion was tooo simple.

Edited by Dirk98

Share this post


Link to post
Share on other sites

2 easy,

thx a lot 4 the megafast answer (you guys rock!)

Let's take it a bit further. I know that a certain process start around a certain time and I want to stop it just after it starts. I would like to monitor the task manager for the start of that process and then kill it.

how to do that?


The more you learn, the less you know.

Share this post


Link to post
Share on other sites

When you say certain time do you mean like an exact time of day? Or a certain time after you execute something?

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

How about RTFM..:)

It should be a big hint at the same place you find ProcessClose. Something like ProcessList?

DEIT: Or ProcessWait.

Edited by Uten

Share this post


Link to post
Share on other sites

2 easy,

thx a lot 4 the megafast answer (you guys rock!)

Let's take it a bit further. I know that a certain process start around a certain time and I want to stop it just after it starts. I would like to monitor the task manager for the start of that process and then kill it.

how to do that?

Open up AutoIt helpfile and look at these functions: ProcessList, ProcessClose

Play with examples listed there and accomodate them for your needs.

For details about processes maybe help you WMI. Search for CompInfo UDF

Share this post


Link to post
Share on other sites

okay, okay,

point taken, I'm evolving...

One more though, I have the impression that I can't stop a process run as SYSTEM. If I do it from the task manager itself, it works, but with the ProcessClose it keeps running.

Any takers?


The more you learn, the less you know.

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