How to TASKKILL a specific "program.exe" on a machine with many "program.exe" running

1.1k views Asked by At

On my server i run a batch that call "program.exe", this program processes some data and close. If it doesn't close i will need to kill it. The problem is that i could have many "program.exe" on the same machine but i have to kill only mine. Is it possible?

The batch file is called from an ASP page and it is launched with LocalSystem user privileges and does the following:

c:
cd \infos_a\exe
set infos=c:\infos_a\files\paolor
start /LOW program.exe #C:\inetpub\wwwroot\infospnt\bat\01\

if program.exe run more than 30sec it must be killed

1

There are 1 answers

0
user5032396 On

Taskkill help gives an example

taskkill /im program.exe /fi "Username eq MyName"