TY, Ninju I understood from u that mu assumption was correct. There isnt any way to kill process under windows.
ty. -----Original Message----- From: Ninju Bohra [mailto:[EMAIL PROTECTED] Sent: Monday, May 30, 2005 5:46 AM To: Ant Users List Subject: Re: How to stop process using exec? Windows does not come with a "kill" utility by default. There is a "kill" utility in the NT resource kit (which useable on OSes above NT). There is also a enhanced PSKill utility from SysInternals (http://www.sysinternals.com) which you can use. The hardest part of killing a process (regardless of the OS) is determining someway to indentify the proces to the "kill" program. The PID (process ID) is usually the most exact way, however it difficult to obtain the PID externally. Some "kill" program (PSKill for example) can also take the process name. I would highly recommend NOT using the OS to kill a process. OS killing of process is a very messy deal (particulary on Windows) which can result in resource leakage, Protection faults and Process Termination Dialog boxes appearing. It is advisable to seek another way to accomplish your goal. Later, Ninju --- Nir Geier <[EMAIL PROTECTED]> wrote: > hi all, > > Does anyone knows how can I stop process under > windows? > > For example: > executing the following (Under Windows): > > <target name="name" description="desc"> > <exec executable="cmd.exe"> > <arg line="/c ping -t 127.0.0.1"/> > </exec> > </target> > > is there any way to write ant to stop the target? > > Nir Geier. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: > [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] > > __________________________________ Yahoo! Mail Stay connected, organized, and protected. Take the tour: http://tour.mail.yahoo.com/mailtour.html --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]