in reply to Re: Re: Stopping a file handle process in NT
in thread Stopping a file handle process in NT
Your code is giving a T/F response, I think. If you open the process with win32::process, I believe that you get the PID this way (not really tested)
foreach $server (@servers){ Win32::Process::Create($ProcessObj, "c:\\perl\\bin\\perl.exe", "perl.exe c:\\script.pl", 0, NORMAL_PRIORITY_CLASS, ".")|| die ErrorReport(); $ProcessObj->GetProcessID()
The last bit returns the process ID. To kill it, use:
Win32::Process::KillProcess($pid, $exitcode)
|
|---|