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
