Is there an application for windows that can terminate other programs after a certain period of time.
I would use this program for shutting down movie player when I want to watch only 30 minutes of lecture that lasts an hour for example.


2 Answers 2


For automating what you are asking and many other things in Windows there is a great and free scripting tool and app called AutoIt v3 which can do what you want with a little bit of basic programming (or a few clicks that can generate that script). You will find a lot of information on their site.

For example to do what you are asking could be as easy as writing (or generating) something close to

$Timer1= TimerInit()

While True
     If TimerDiff($Timer1) > 30*60*1000 Then
        ProcessClose(<YOUR APP>)

Autoit is very powerful and you can of course add more logic and function depending on your needs.

  • Tnx. Can you tell me what can I put in <YOUR APP> other than PID? Because PID changes, I've tried, app name, and full path of app. @user3134164
    – Davidenko
    Dec 30, 2014 at 21:09
  • 1
    You should be able to put the app name such as "notepad.exe" for example. See: autoitscript.com/autoit3/docs/functions/ProcessClose.htm If your app name does not work maybe you are using it a bit differently check with Task Manager to use the correct name (Ctlr+Alt+Del Start Task Manager) Dec 31, 2014 at 9:24

Another well known program that can take care of many different kinds of automation is AutoHotkey.

With AutoHotkey you can write a script that is manually executed or is started with Windows and is running while Windows is running. It should meet your requirements because it can...

  • check if a program is running or a window is open
  • wait for a given duration before doing something specific
  • close a window/program

You can also build user interfaces (for example dialog boxes) to interact with so that you can have better control over your scripts.

  • Welcome to Software Recommendations – and thanks for sharing! Unfortunately, this post does not contain enough information to be considered an answer. Please read our discussion on what makes an answer high quality to see if you can incorporate some of these improvements into your answer. Especially missing: How does it meet the requirements? How can it accomplish what the OP asked for? See e.g. how the other answer explains this.
    – Izzy
    Jun 2, 2017 at 22:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.