in reply to Re: Re: Re: Win32::Process::KillProcess
in thread Win32::Process::KillProcess
The PID ($pid) I get from this method is valid, I have verified that it is via a simple fkill on that PID.# WMI Win32_Process class $CLASS= "winmgmts:{impersonationLevel=impersonate}$machine\\Root\\cimv +2"; $WMI= Win32::OLE->GetObject($CLASS) || die; foreach my $process (sort {lc $a->{Name} cmp lc $b->{Name}} in($WMI->I +nstancesOf("Win32_Process"))) { if($process->{Name} eq 'GravitixService.exe' || $process->{ProcessID +} eq 'Gravitix.exe') { # Store the Gravitix process ID $pid= $process->{ProcessID}; } }
result -- nothing, process is not killedmy $x= Win32::Process::KillProcess($pid, $exitcode);
result -- nothing, process is not killedmy $y= Win32::Process::Open($p_obj, $pid, 0); $p_obj->Kill(0);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Re: Re: Win32::Process::KillProcess
by Ninthwave (Chaplain) on Dec 23, 2003 at 21:54 UTC |