writing a batch file to kill open windows

July 2, 2011 at 01:54:11
Specs: Windows 2003
My server opens many windows for a given exe that pop up from a service and close normally after around 10 seconds

I would like to write a batch file that will close windows of "abc.exe" if they have been open for more than a minute, say.

I would like a way of detecting how long a window has been open and specify that I only want this batch to affect "abc.exe" and then close them if they have essentially stopped responding.
I also want to allow this batch to run continually

Many thanks

See More: writing a batch file to kill open windows

Report •

July 2, 2011 at 04:32:44
Take a look at the wmic command. Something like this should get you started:

wmic process where Name="abc.exe" get CreationDate /format:list

When your only tool is a hammer, every problem looks like a nail.

Report •
Related Solutions

Ask Question