|
-
May 31st, 2007, 02:56 PM
#1
Thread Starter
Fanatic Member
[RESOLVED] Kill spesific proccess useing C#
Hi all,
I have searched up and down and i can only find this VB example on how to do this. needless to say i am having trouble converting it over to c#
http://www.vbforums.com/showpost.php...03&postcount=2
For Each proc As Process In Process.GetProcessesByName("process name here");
proc.CloseMainWindow() //ask the process to exit.;
proc.WaitForExit(10000) //wait up to 10 seconds.
If Not proc.HasExited Then
{
proc.Kill() //force the process to exit.
}
Next proc
I understand the idea but im having trouble with the syntax
do i need to import something to for it to recoginize proccess?
Last edited by Crash893; Jun 4th, 2007 at 12:44 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|