#!/usr/bin/perl -w use strict; use Win32::OLE; use Win32::Process::Info; my $pi = Win32::Process::Info->new (undef, 'WMI'); print $pi; my @info = $pi->GetProcInfo (); # Get the max relationships. for (my $p = 0; $p < scalar @info; $p++) { if (!($info[$p]{'ProcessId'})) { $info[$p]{'ProcessId'} = ''; } if (!($info[$p]{'Name'})) { $info[$p]{'Name'} = ''; } if (!($info[$p]{'ExecutablePath'})) { $info[$p]{'ExecutablePath'} = ''; } my $pid = $info[$p]{'ProcessId'}; my $pnm = $info[$p]{'Name'}; my $pex = $info[$p]{'ExecutablePath'}; print "ID:$pid\tNAME:$pnm\tExPath:$pex\n"; }