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 use a program for hosting multiple forms.

Each form leaves a systray program of said program. In Processing they all use the same same.

But Window wise/mouse over name while in tray they use the name of the form.

I can close all four at once but I wish to close certain ones with a batch file.

If anyone could help hat would be great.

share|improve this question
By "systray", do you mean the taskbar (window list) or the notification area (icons in bottom-right corner, near the clock)? – grawity Apr 9 '11 at 20:53
I mean the Notification area. – Gunder Apr 10 '11 at 1:29

NirCmd can close windows by title, class name, or hwnd.

nircmd win close title "Calculator"

nircmd win close class "IEFrame"

You can write your own program using EnumWindows() and SendMessage(hwnd, WM_CLOSE, NULL, NULL).

share|improve this answer
@Joey: Post that as a separate answer. – grawity Apr 9 '11 at 23:36
Having slight troubles with nircmd, I think it's because I'm not getting the right hwnd. Is that a bat I can right to determine that it's hwnd is? I assumed it was the name in the little hover over bubble. – Gunder Apr 10 '11 at 11:36

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.