On XP (and I think on 2000) there are standard command-line tools for this; 'tasklist' will list all the processes, and 'taskkill' will kill a specified one.
Both are normally installed in c:\windows\system32 Dan -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of LeFevre, Ken Sent: Tuesday, April 18, 2006 7:31 AM To: Jack D.; Dan Jablonsky; perl-win32-users@listserv.ActiveState.com Subject: RE: stop a Windows application from within a Perl script There's also a great command line tool by Mark Russinovich (which is easy to launch from a perl script) called pskill (you can get it at www.sysinternals.com). -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Jack D. Sent: Monday, April 17, 2006 10:52 PM To: 'Dan Jablonsky'; perl-win32-users@listserv.ActiveState.com Subject: RE: stop a Windows application from within a Perl script > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On > Behalf Of Dan Jablonsky > Sent: April 17, 2006 8:00 PM > To: perl-win32-users@listserv.ActiveState.com > Subject: stop a Windows application from within a Perl script > > Hi all, > I have a very simple script that pings the outside world and > reboots a router when it gets no answer to the ping anymore; > on top of that I need to stop and start again a windows application. > I know how to start the app and I know how to stop it if it > were unix -> to stop the app, just kill the associated process ... > How does one do this in Windows? If you start the application using Win32::Process you would just kill it using the pid (similar to unix) Win32::Process::KillProcess($pid) J. _______________________________________________ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs Working together. For life.(sm) _________________________________________________ This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of the email by you is prohibited. Dansk - Deutsch - Espanol - Francais - Italiano - Japanese - Nederlands - Norsk - Portuguese - Svenska: www.cardinalhealth.com/legal/email _______________________________________________ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs -- The information contained in this communication and any attachments is confidential and may be privileged, and is for the sole use of the intended recipient(s). Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please notify the sender immediately by replying to this message and destroy all copies of this message and any attachments. ASML is neither liable for the proper and complete transmission of the information contained in this communication, nor for any delay in its receipt. _______________________________________________ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs