sorry if I am using wrong terms, I am new to this stuff. so I have been trying to get this command (taskkill /f /t /im (the process)) to keep repeating because the process that I am trying to kill keeps coming back. so I thought if i can get the command to keep repeating it will keep the process closed. please I would like some help, thank you.
Asked
Active
Viewed 292 times
3
-
1You can use `goto` to jump back to the beginning, but isn't it better to attack this problem at the root? WHY does the process keep coming back? – Mr Lister Jul 30 '15 at 05:11
-
Thx every one for your help I will try to use your ways to find a solution to my probelm. Again thx. – Ali Shuaib Jul 31 '15 at 06:18
1 Answers
1
Just loop through
@echo off
:loop
taskkill /f /t /im (the process)
goto loop
Or add a delay using ping
or timeout
@echo off
:loop
taskkill /f /t /im (the process)
timeout /t 30 /nobreak >nul rem Change out 30 for the number of seconds needed in the delay
goto loop
As @MrLister said in the comments above, address the problem directly. Ask yourself "did i get this program from a reliable source?" if not, it could be malicious. If it is safe, then why is this behavior occurring? Could it be scheduled with taskscheduler? Best of luck.

UnknownOctopus
- 2,057
- 1
- 15
- 26