General discussion


Kill application by script

By sr ·
Im running a backup with zip commands in a batch script, i need to close an application before the scripts starts, is there an? way to do that?

This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Comments

Collapse -


by bincarnato In reply to Kill application by scrip ...

You can try to use PSKill from Sysinternals/MS but I would contact the program manufacturer to see if they have a way to stop thier application from a command prompt.

Collapse -

use 'end it all' utility

by robo_dev In reply to PSkill,2704,697,00.asp

EndItAll 2 lists all the programs running on your system, and lets you decide which ones to close down. The processes necessary for basic system operation are protected from termination. From the remaining processes, you can choose which to close, which to kill (close down forcibly), and which to protect. Once you know which files you want to shut down, you can configure EndItAll for automatic action via script or batch file. This is useful for backups and defrags during off-hours. Options let you block power management and the screen saver during operation.

Collapse -

If you are using

by Dumphrey In reply to Kill application by scrip ...

a standard windows batch file, tasklist and taskkill should do the trick. (they may be n the windows support tools as opposed to built in, not sure) You can use an if statement and tasklist to list running process, if its running, shut it down with taskkill.

much like
tasklist /FI "imagename eq <prog name as it appears in Task Manager Processes> "
if "errorlevel" == "0" taskkill /F /IM <prog name as it appears in Task Manager Processes>

Related Discussions

Related Forums