Batch Programing - Deleting Running Files

Post here about scripting and programming for HaloPC (audio, network, ai, etc.)
Post Reply
User avatar
grimdoomer




System Engineer

Posts: 1440
Joined: Mon Oct 09, 2006 4:36 pm

Batch Programing - Deleting Running Files

Post by grimdoomer »

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:

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
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.
Image
AI Zones in MP | Ambiance | Gravemind Beta v1.1
Aumaan Anubis wrote:Grimdoomer. The first person ever to mod Halo 2 Vista.
Patrickssj6




Pi Collaborator

Posts: 5426
Joined: Sat Jul 24, 2004 12:12 pm
Location: I'm a Paranoid
Contact:

Post by Patrickssj6 »

Maybe you should read some Papers about Viruses first...it's not like removing them from the process list is going to disable them. Besides, viruses aren't even processes running in the background more like instances/services or injecting loaders.

About your issue...I don't know how taskkill disables/removes the running process but there are some APIs for it.
User avatar
grimdoomer




System Engineer

Posts: 1440
Joined: Mon Oct 09, 2006 4:36 pm

Post by grimdoomer »

I never sayed it was gunna, but because I cant find a way to override that delete check, I have to terminate the procces tree first. And unpluging the LAN cable takes care of any remote services :lol:
Image
AI Zones in MP | Ambiance | Gravemind Beta v1.1
Aumaan Anubis wrote:Grimdoomer. The first person ever to mod Halo 2 Vista.
Post Reply