cheine has asked for the wisdom of the Perl Monks concerning the following question:

Hi wise Monks, which modules do I need and how can I kill (send sigintkill) to all process(es) with a given (known process or file) name within an envirement of win32 (eg. win2000 or winxp)? Thx ch
  • Comment on Killing all processes with a given name within win32(win2k..)

Replies are listed 'Best First'.
Re: Killing all processes with a given name within win32(win2k..)
by BrowserUk (Patriarch) on Jul 08, 2004 at 13:30 UTC

    Win32::Process::Info will get you the information you need to do this. Then it's a case of looping through the list returned by the GetProcInfo() method and using perl's kill function on the right ones.


    Examine what is said, not who speaks.
    "Efficiency is intelligent laziness." -David Dunham
    "Think for yourself!" - Abigail
    "Memory, processor, disk in that order on the hardware side. Algorithm, algoritm, algorithm on the code side." - tachyon