Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Kill A Process [C#]
#1
Code:
{
                                    Process[] processes = Process.GetProcessesByName(TextBox1.Text);
                                    foreach (Process process in processes)
                                    {
                                        process.Kill();
                                    }
                                    Function.WriteTo(chan, "Killed Process " + TextBox1.Text + ".exe" + " !");
                                }

this could be usefull code. to reduce cpu usage to kill useless process.

anti virus.

etc.

usefull Victoire
Reply
#2
Thanks for sharing. Useful bit of code.
Reply
#3
Thanks again mate.
Reply
#4
Thank you for sharing this, that is a useful code. I needed it badly, so this helped me alot!
SUPPORTFORUMS HELPER
Reply
#5
Does this kill it for ever or just for until you shut off your computer?
[Image: pughacking.png]
Reply
#6
it only kills it until you shut ur comp of but if you turn just that code into a program then add a code to make run on start up could work? correct me if I'm wrong
Marda Superman
Reply
#7
(08-29-2010, 07:20 AM)Marda Wrote: it only kills it until you shut ur comp of but if you turn just that code into a program then add a code to make run on start up could work? correct me if I'm wrong

So it would mainly used for anti viruses which say u cant do this correct?
[Image: pughacking.png]
Reply
#8
yer practically

Felt like i should out something more Tongue
Marda Superman
Reply
#9
Thanks a lot, this could be useful for many things.
Reply
#10
I use this quite a bit, although you should trim your code down a bit; it's got a couple of useless lines in it (People won't understand what your Function.WriteTo method is) Also the random { at the start ;)
Code:
Process[] processes = Process.GetProcessesByName(TextBox1.Text);
foreach (Process process in processes)
{
       process.Kill();
}
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  [Source] List Process'/Kill Process ♱ RedTube ♱ 3 1,809 11-25-2012, 10:39 PM
Last Post: ƃu∀ ıʞƃu∀
  [VB.Net] Local/Remote TCP info from process [Source] The-One 5 4,114 08-11-2012, 05:18 PM
Last Post: Kenneth
  [Project] Write To Another Process' Memory Block AceInfinity 5 2,728 03-31-2012, 04:05 AM
Last Post: AceInfinity
  Process Detective (32 & 64 bit binaries) AceInfinity 3 1,522 03-23-2012, 12:09 PM
Last Post: AceInfinity
  [Vb.net] List and Kill Processes[Tut] Slurms Makenzi 11 3,440 07-21-2011, 11:21 AM
Last Post: AceInfinity

Forum Jump:


Users browsing this thread: 2 Guest(s)