Discussion Locked

Kill application by script

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
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?

3 replies

by bincarnato

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.

by robo_dev

http://www.pcmag.com/article2/0,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.

by dumphrey

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 "
if "errorlevel" == "0" taskkill /F /IM

This discussion is closed to new replies.