470,855 Members | 1,217 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,855 developers. It's quick & easy.

Terminating an external program

Hi guys, please help me. this is really important. i am using the
runtime.exec() command to execute an exe file -- say notepad.exe.
After certain lines of code, i want to terminate this program from
within my application. I have used pskill.exe to kill the service but
only works on WINNT and XP. i want one that can be used on all windows
platforms. The "Kill.exe" which comes with the Windows 98 resource kit
does not work. Any other method? (Native, Using External Programs or
any other means), please provide source code if possible.
Thanks
-Raam
Jul 17 '05 #1
2 4465
I have not tried it but MKS toolkit has a "kill" command
that runs on DOS and is supposed to be like the UNIX
command that might work for you. Usage is
kill -9 pid
where pid is the process id of the process you wish to kill
You can use the MKS toolkit "ps" command to get the pid.

"Raamkanna Saranathan" <ra*******@hotmail.com> wrote in message
news:bc**************************@posting.google.c om...
Hi guys, please help me. this is really important. i am using the
runtime.exec() command to execute an exe file -- say notepad.exe.
After certain lines of code, i want to terminate this program from
within my application. I have used pskill.exe to kill the service but
only works on WINNT and XP. i want one that can be used on all windows
platforms. The "Kill.exe" which comes with the Windows 98 resource kit
does not work. Any other method? (Native, Using External Programs or
any other means), please provide source code if possible.
Thanks
-Raam

Jul 17 '05 #2
THanks much.
In addition to that i found the below link very useful.
Works on 9x/ME/2k/XP :-)
http://mvf.neurophys.wisc.edu/ravi/software/killproc/
-Raam
Jul 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Earl Eiland | last post: by
reply views Thread by David Baumgarten | last post: by
47 posts views Thread by Richard Hayden | last post: by
23 posts views Thread by Adam Clauss | last post: by
4 posts views Thread by My SQL | last post: by
2 posts views Thread by =?Utf-8?B?YmFzaA==?= | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.