943,948 Members | Top Members by Rank

Ad:
You are currently viewing page 1 of this multi-page discussion thread
Jan 27th, 2009
0

How to kill a particular process forcibly

Expand Post »
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
Reputation Points: 10
Solved Threads: 0
Newbie Poster
karthiknv is offline Offline
12 posts
since Jul 2008
Jan 27th, 2009
0

Re: How to kill a particular process forcibly

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
Reputation Points: 19
Solved Threads: 115
Nearly a Posting Virtuoso
cguan_77 is offline Offline
1,317 posts
since Apr 2007
Jan 28th, 2009
0

Re: How to kill a particular process forcibly

can somebody give me code to kill the process using system.diagnostics.process
Reputation Points: 10
Solved Threads: 0
Newbie Poster
karthiknv is offline Offline
12 posts
since Jul 2008
Jan 28th, 2009
0

Re: How to kill a particular process forcibly

Click to Expand / Collapse  Quote originally posted by cguan_77 ...
...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 ?
Team Colleague
Reputation Points: 361
Solved Threads: 214
Taboo Programmer
Comatose is offline Offline
2,413 posts
since Dec 2004
Jan 28th, 2009
0

Re: How to kill a particular process forcibly

I should not kill the other copies.....i have to kill a particular process of a window only.... i need the code in VB6....
Reputation Points: 10
Solved Threads: 0
Newbie Poster
karthiknv is offline Offline
12 posts
since Jul 2008
Jan 28th, 2009
0

Re: How to kill a particular process forcibly

Reputation Points: 19
Solved Threads: 115
Nearly a Posting Virtuoso
cguan_77 is offline Offline
1,317 posts
since Apr 2007
Jan 29th, 2009
0

Re: How to kill a particular process forcibly

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.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
karthiknv is offline Offline
12 posts
since Jul 2008
Jan 29th, 2009
0

Re: How to kill a particular process forcibly

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.
Team Colleague
Reputation Points: 361
Solved Threads: 214
Taboo Programmer
Comatose is offline Offline
2,413 posts
since Dec 2004
Jan 29th, 2009
0

Re: How to kill a particular process forcibly

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().
Reputation Points: 165
Solved Threads: 59
Posting Pro in Training
DangerDev is offline Offline
485 posts
since Jan 2008
Jan 29th, 2009
0

Re: How to kill a particular process forcibly

Click to Expand / Collapse  Quote originally posted by DangerDev ...
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...
Reputation Points: 1182
Solved Threads: 392
Posting Sensei
Jx_Man is offline Offline
3,141 posts
since Nov 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Visual Basic 4 / 5 / 6 Forum Timeline: about timer
Next Thread in Visual Basic 4 / 5 / 6 Forum Timeline: Textbox over a bit map in EXCEL SHEET





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC