• Welcome to Overclockers Forums! Join us to reply in threads, receive reduced ads, and to customize your site experience!

Desktop link that closes a program?

Overclockers is supported by our readers. When you click a link to make a purchase, we may earn a commission. Learn More.

Oroka Sempai

Member
Joined
Jul 22, 2004
Location
Port Elgin, Canada
I need a easy way to close a program that runs in the BG, and I dont like going to the Task Manager everytime to close it.

Is it possible to create a link for the desktop that closes a specific program?
 
if you use XP, you can create a bat or cmd file with the following:

taskkill /f /im program.exe

substitute program.exe with the name of the exe you want to terminate.

you will need to do this for each program you want, unless you want a bunch done at once. Are you familiar with batch file programming?
 
Know Nuttin said:
if you use XP, you can create a bat or cmd file with the following:

taskkill /f /im program.exe

substitute program.exe with the name of the exe you want to terminate.

you will need to do this for each program you want, unless you want a bunch done at once. Are you familiar with batch file programming?
another thing you can do is make a batch file with the following:
taskkill /f /im %1

then save that in a directory that is set in path (or just put it in system32) then whenever you want to kill something go to start--run--<name of batch file> program
 
I posted you question on a small, private board that I belong to. One of the guys is a programmer and he basically said the same thing as the 2 responses above me. He also added some other info that I though was interesting about killing an app with Task Manager:

Not in any easy and reliable manner I can think of.

But Task Manager is not the recommended way to terminate most background programs either. Many programs leave poopy messes when you pull the rug out from under them like that. It all depends on the app and what it does.

The bottom line is that Task Manager shut down is an OS level operation - there is no universal message to tell an application to shut down gracefully. Task Manager doesn't issue a "file/close" menu command - it just tells the operating system to forcefully terminate an application in memory. I do not believe there are exceptions to this. Probably the most frequent use of this is to shut down an application that has failed and become unresponsive - so if Task Mgr simply told apps to shut down gracefully - it would be unable to shut down an application that had locked up.

Generally speaking, if the application does not have a GUI, it has a command line interface that can be used to close it gracefully. In such a case, it is fairly easy to write a BAT file that issues the close command to the application. Then you can of course create a shortcut to launch a BAT file - or even put the BAT file right in the desktop folder.

What app(s) do you wish to shut down this way?

...all that said - I could write an application that would terminate a given process at the OS level in a few lines of code using old-school Windows API calls (application programming interface). I generally code applications with higher level languages that rarely require me to use the Windows API - but I've coded task management functionality before - and information on these API calls is easily found on the internet.

If you have MS-Office, I'm pretty certain you could code a VBA-based startup macro into an Excel spreadsheet that would kill a process - make a shortcut to the Excel spreadsheet - voila.
 
Know Nuttin said:
you will need to do this for each program you want, unless you want a bunch done at once. Are you familiar with batch file programming?


Never touched a batch file, but I love messing with things :D
 
Back