Sign in to follow this  
Followers 0
Mucho

Script to Monitor and Kill a Windows Process

4 posts in this topic

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.

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

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

Share this post


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

Share this post


Link to post
Share on other sites

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.

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