Killing Windows apps

Started by
5 comments, last by Zibar 20 years, 11 months ago
Long time ago when I still used UNIXes I remember that I have used the command ps -kill quite often. Now WinNT has this nice task manager, that becomes a disaster if a fullscreen application stops responding, especially if this application is in exclusive mode. I often need to press the little reset key. While Task Manager works perfectly for the most normal applications it is not good for killing fullscreen applications and when I make such programs (and I have lots of bugs) I am often quite frustrated. What do you do about that? Is there a way to kill fullscreen applications in WinNT gracefully? I think Windows need the console funtionality found on Linux (where one can kill and restart x if necessary)
Advertisement
taskkill is available. You can use it to kill any process by name or id. The trick is in creating a script that you can run with a hotkey combo.
.
thanks, sounds interesting
are there any examples how to do it?
As an example, assume you wanted a way to close foo.exe
Then create a file called killfoo.bat, and in that file place:
taskkill /im foo.exe 

Now create a shortcut to killfoo.bat on your desktop.
Do a right click on the shortcut, and select properties.
Click in the Shortcut key edit field, and then just push some letter or number. Ctrl-Alt-Key will be the keycombo that will activate the shortcut.
Now when foo.exe is running, you can just press Ctrl-Alt-Key and foo.exe will close. Or rather, should close. If it fails to close, you can try adding the force option, /F , before the /im.
.
Also I just tried this method with Quake II running fullscreen. It worked, though Quake2 reported a message about SwapBuffer failing. It did successfully terminate, and even returned the display to the normal desktop mode.
.
Thanks if it works for me it will be great... now I first have to find taskkill of course ;_)
found it

This topic is closed to new replies.

Advertisement