Batch Programing - Deleting Running Files
Posted: Sat Mar 29, 2008 5:14 am
Well, im working on a virus hijaking program that will COUNTER the viruses on a computer. Its proven very useful especial when you can get into the task manager But I still need to delete the viruses all together. But some of then I cant because they are running. Is there any way to override this and delete them? Im using batch, heres what I have so far:
I had to impravise because the actual code is sitting on my friends computer. But this worked greate to just terminate there proccess tree. But I still need to delete them.
Code: Select all
@echo off
echo ********Squidbilly's Virus Recovery Tool********
echo This will terminate and delete viruses and files that could contain them!
echo Processing...
start C:\WINDOWS\System32\taskkill.exe /f /im Virus name
del C:\ProgramFiles\Virus
start C:\WINDOWS\System32\taskkill.exe /f /im Virus name
del C:\ProgramFiles\Virus
start C:\WINDOWS\System32\taskkill.exe /f /im Virus name
del C:\ProgramFiles\Virus
start C:\WINDOWS\System32\taskkill.exe /f /im Virus name
del C:\ProgramFiles\Virus
start C:\WINDOWS\System32\taskkill.exe /f /im Virus name
del C:\ProgramFiles\Virus
//Delete cookies, empty recycle bin
echo Finished!
echo Thank you for using Squidbilly's Virus Recovery Tool
pause