Hi,

For my project, i have to kill a Java.exe process of a particular application forcibly( i have other application runs on java.exe- i should not kill it). Can somebody do the needful....it's very urgent...please help me....


Thanks & Regards,
Karthik

hi,be more specific you want to kill the process through a vb program..
or you just want to kill process in any way..you can use task manager to end a program..
or you can go command prompt use tasklist and tskill to end a program..
or if you want to do it in vb check out System.Diagnostics.Process

can somebody give me code to kill the process using system.diagnostics.process

...if you want to do it in vb check out System.Diagnostics.Process

Sure, If you are using .NET.... not gonna work in vb 4/5/6. I can get you the code to kill a process from within VB6, but figuring out how to know if it's the one you want to kill or not is a different story altogether. I suppose you could kill all copies of java, and then just open the one you want ?

I should not kill the other copies.....i have to kill a particular process of a window only.... i need the code in VB6....

In the above link, i didn't see killing a particular process(when some more same processes are running). Can somebody give me code using System.Diagnostics.Process. I think we can a kill process by checking for which application a particular process is running.

I'll say it again......

you're in the VB 4/5/6 forum. System.Diagnostics.Process is for VB.NET, NOT VB 4/5/6. If you want answers about it, then ask there. Not Here.

use
System.Diagnostics.Process.GetProcessesByName(processName);
to get all the process with this name. After this use the process properties like, process.ModuleName etc. to get the required process, then kill the process by calling function process.kill().

use
System.Diagnostics.Process.GetProcessesByName(processName);
to get all the process with this name. After this use the process properties like, process.ModuleName etc. to get the required process, then kill the process by calling function process.kill().

This section just for vb4/5/6. Don't make it become VB.Net Section...

Sure, If you are using .NET.... not gonna work in vb 4/5/6. I can get you the code to kill a process from within VB6, but figuring out how to know if it's the one you want to kill or not is a different story altogether. I suppose you could kill all copies of java, and then just open the one you want ?

i could really use this code you were talking about. thanks

I saw somewhere in the internet,killing a process and process listing using Wrapper, in VB6. That's why i was asking the question....can we do that using NetFrameworkWrapper??

This article has been dead for over six months. Start a new discussion instead.