in reply to Kill a process in Perl

Thank you so much for your prompt replies and good suggestions, GrandFatherm, syphilis and BrowserUk!
Yes, I followed your suggestion using Win32::Process, and it works perfectly well in my case (with Create and Kill). Thanks a lot!

syphilis mentioned using KillProcess. Is there any way to screen/read the current processes running in Windows to get their pid in Perl?
Thanks!
Uzers

Replies are listed 'Best First'.
Re^2: Kill a process in Perl
by BrowserUk (Patriarch) on Jul 11, 2009 at 09:22 UTC
    Is there any way to screen/read the current processes running in Windows to get their pid in Perl?

    Yes. Win32::Process::Info will get you most the information you need to do that. The missing part is the command line (parameters) if you need those to distinguish between concurrent instances. Though you may be able to determine that by using the ->Subprocesses() method if you know the pid of the process that started the instance you are looking for.


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.