Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to close applications which contains some target words on their title or their name or in their text boxes, after they run.

For example if an application's title contains "keylog" then After running a third party application detect it and closes it. also the same with its file name.

Is there any third party application for doing this?

share|improve this question
Why would you want to do this? Why not use allow-based restrictions instead to get rid of anything? Why not actually figure out what program makes this dialog boxes and get rid of the program? – Tom Wijsman Sep 28 '11 at 19:39

Without third party software (of which, I can't really recommend any), this is not easily achievable with the built in features of Windows. The closest you can get is to use the business versions of Windows (Professional and higher), and use Group Policy to restrict the list of applications that can be run.

This being said, it is an include list, not an exclusion list.

However, it is highly likely that these applications could bypass your security simply by renaming themselves or similar.

It would be impossible to protect via an application's title as the application would already have run by this point - unless you do some sort of decompiling/resource look up in advance - however, this will most likely be inefficient, very slow and not always work (in the case of obfuscation).

If you want to go ahead with an allow list, here is a guide for XP, Windows Vista/7 are very similar, but, if you need help, let me know and I will write a guide for you.

share|improve this answer
Hi William, Thanks for your reply. But I do not want to do this with the power of windows. I'm looking for a third party software for this purpose. As I told in my firs post, I'm looking for an APPLICATION for doing this. So if you know any good third party app, then please introduce it :)) – Stranger Sep 28 '11 at 15:16
@MajidPasha: Using Windows is the only way to not prevent the application from running. Third party applications can only close the application after it has run, unless you were to install software that uses drivers like Comodo+'s Defense+ which can prevent application starts. The problem with this kind of software is that they are too bloated for the thing you are trying to do... – Tom Wijsman Sep 28 '11 at 19:49
Hi William, Maybe I was wrong that I used "Prevent from running". If the app can be closed after running then there is no problem again. I mean someone run a bad app and my software detect and closes it. So is there any app for doing this? – Stranger Sep 29 '11 at 6:37

AutoIt would be my best recommendation. It has the ability to poll for window title or text (both hidden and visible windows) and process name (WinExists(), ProcessExists()) and has options for closing applications by process or by window (WinKill(), WinClose(), ProcessClose()). Because it is a scripting language, it is extremely configurable to filter out exactly what you want, but might have a higher learning curve than other apps.

Note: it won't prevent them from running, but it will kill them immediately once they attempt to run.

Here is some example code:

Opt("WinTitleMatchMode", 2)

While 1

If ProcessExists("notepad.exe") Then

If WinExists("Paint","") = 1 Then



This will close any window with "Paint" in the title and the notepad.exe process as soon as they start.

share|improve this answer
Hi MaQleod, Thanks But Autoit is a little complex, is there any other application which do the same easily in GUI interface? – Stranger Sep 28 '11 at 16:25
@Majid Pasha I just updated my answer with some sample code, it really doesn't need to get much more complex than what I have posted, but depending on your needs, there are a lot more options to add. Does that help with at least the basic structure of what you are looking to do? – MaQleod Sep 28 '11 at 19:37
I have edited my post. – Stranger Sep 29 '11 at 16:52

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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