Jump to content

Script to Monitor and Kill a Windows Process


Recommended Posts

I need a script to monitor an updating program and if it hangs, kill it. When it hangs, the CPU time of the process stops running. Normally, it runs for about 3 minutes, but often hangs at 10 seconds and the computer becomes sluggish.

Link to comment
Share on other sites

Sounds interesting.. What do you want from us? i.e. What is your question?

Just a heads up, if you now ask your statement as a question e.g. "How do I make a script to monitor ... that will kill after ...?" etc, then I will tell you to open the script editor and start typing. Let's just leave it at: You need to ask a more specific question that involves more work on your end, and less work on our end.

Edit: Forgot a word.

Edited by Manadar
Link to comment
Share on other sites

Manadar,

I'm sorry if I sound presumptive as I thought it better to get straight to the point.

I already have AutoIt script that is started by the updater and its purpose is to act as a timer to show the duration of the update in a window . But the updater can hang(the "CPU Time" in the Task Manager stops) while the timer keeps going. I have searched the forum to no avail for something that monitors for hanged windows processes and terminate them automatically. It's probably something not commonly touched on.

My knowledge of Autoscript is only rudimentary, mostly cut and paste. So, please help me out.

Link to comment
Share on other sites

  • 2 months later...

when you say the program hangs you mean is it a non responsive application in the taskmgr? if so

you should go here it is a tutorial on how to set windows to auto close non responsive programs for XP, but win7 i'm not sure of.

also what are you trying to update? there is a website called nninite that will automatically download and update freeware programs, they have like 30+ and growing.

Normally, it runs for about 3 minutes, but often hangs at 10 seconds and the computer becomes sluggish

one thing you could do is have a script that is set to sleep 3min + and end the Update.exe script you have so if it is still open for that time it will kill it.

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