There  are a number of kill programs on the 'net
Try Google

One of the results is http://www.loa.espci.fr/winnt.html
It says the C/C++ source is included, so it may help

++ Nick Hall



                                                                                       
                                              
                    <[EMAIL PROTECTED]>                                        
                                              
                    Sent by:                               To:     
<[EMAIL PROTECTED]>                             
                    [EMAIL PROTECTED]        cc:                         
                                              
                    eState.com                             Subject:     RE: [URGENT] 
Get Process List (PID's)                        
                                                                                       
                                              
                                                                                       
                                              
                    28/05/2002 10:55                                                   
                                              
                                                                                       
                                              
                                                                                       
                                              




You are tell me , that there is no way of kill process's on win32 box?

-----Original Message-----
From: Kris Wolff [mailto:[EMAIL PROTECTED]]
Sent: ter�a-feira, 28 de Maio de 2002 10:47
To: Eyrich, Christian; Jos� Greg�rio;
[EMAIL PROTECTED]
Subject: AW: [URGENT] Get Process List (PID's)


nice thing.
but how do you do the unix "kill" on a win32 box ?

-----Urspr�ngliche Nachricht-----
Von: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]Im Auftrag von Eyrich,
Christian
Gesendet: Dienstag, 28. Mai 2002 11:38
An: '[EMAIL PROTECTED]'; [EMAIL PROTECTED]
Betreff: RE: [URGENT] Get Process List (PID's)


Hello,

> I need get the list of process running in the nachine.
> Is this possible some way?

you can use the following script if you want...
(you should have installed WMI)

use strict;
use Win32::OLE qw( in );
our $exit = "0";

my $Class = "Win32_Process";
(my $Machine = shift @ARGV || "." ) =~ s/^[\\\/]+//;
if( my $WMIServices = Win32::OLE->GetObject(
"winmgmts:{impersonationLevel=impersonate,(security)}//$Machine" ) )
{

     foreach my $Processes ( in( $WMIServices->InstancesOf( $Class ) ) )
     {
          print("\nProcessID:
".$Processes->{ProcessId}."\t".$Processes->{Name});
    }
     $exit = 0;
}
else
{
          print("\nsorry error\n");
     $exit = 1;
}

exit( $exit )
_______________________________________________
ActivePerl mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

_______________________________________________
ActivePerl mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs



_______________________________________________
ActivePerl mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to