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

Reply via email to