Saved Bookmarks
| 1. |
Solve : End process and delete file every 5 seconds? |
|
Answer» hey guys, having an issue with a virus that keeps REAPPEARING after i delete it, i am trying to temporaily fix this problem until a security update is released.. Usage: sleep time-to-sleep-in-seconds or using ping, replace 2 with the number of timeout you want Quote ping localhost -n 2 -w 1000 >nil as for proccess kill, taskkill or tskill: Code: [Select]TSKILL processid | processname [/SERVER:servername] [/ID:sessionid | /A] [/V] processid Process ID for the process to be terminated. processname Process name to be terminated. /SERVER:servername Server containing processID (default is current). /ID or /A must be specified when using processname and /SERVER /ID:sessionid End process running under the specified session. /A End process running under ALL sessions. /V Display information about ACTIONS being performed.yea i know, but its an exchange problem thats spamming our servers, like i said this is just temporary. ive found that i can use ping to set time but it looks very messy, any other way?sleep doesnt work, in XP anyway@echo off :loop tskill PROCESS (without .exe) del File.ext ping localhost -n 5 -w 1000>nul goto loop But PLEASE go to the computer viruses section to REMOVE your problem, not just hide a symptom. Quote from: Khasiar on OCTOBER 27, 2009, 04:44:31 PM sleep doesnt work, in XP anyway I use XP Pro and sleep works very well. @echo off Code: [Select]set /a c=0 :here echo Sleep 3 seconds and repeat echo when count is 10 quit echo count = %c% C:\batextra\sleep.exe 3 set /a c+=1 if %c% EQU 10 exit /b goto here OutPut: C:\batextra> reploop.bat Sleep 3 seconds and repeat when count is 10 quit count = 0 Sleep 3 seconds and repeat when count is 10 quit count = 1 Sleep 3 seconds and repeat when count is 10 quit count = 2 Sleep 3 seconds and repeat when count is 10 quit count = 3 Sleep 3 seconds and repeat when count is 10 quit count = 4 Sleep 3 seconds and repeat when count is 10 quit count = 5 Sleep 3 seconds and repeat when count is 10 quit count = 6 Sleep 3 seconds and repeat when count is 10 quit count = 7 Sleep 3 seconds and repeat when count is 10 quit count = 8 Sleep 3 seconds and repeat when count is 10 quit count = 9 C:\batextra> |
|