OK
I have managed to get another computer and I installed ActivePerl on it
I installed al the moduls needed and I ran teh naxt code:
#!/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";
}
it runs and in the end I get the result I expect
but in the middle I get many warnings like this:
Use of uninitialized value in integer multiplication (*) at E:/Program Files/Per
l/lib/Time/Local.pm line 76.
Use of uninitialized value in pack at E:/Program Files/Perl/lib/Time/Local.pm li
ne 67.
Use of uninitialized value in pack at E:/Program Files/Perl/lib/Time/Local.pm li
ne 67.
Use of uninitialized value in integer addition (+) at E:/Program Files/Perl/lib/
Time/Local.pm line 67.
Use of uninitialized value in integer addition (+) at E:/Program Files/Perl/lib/
Time/Local.pm line 76.
Use of uninitialized value in integer multiplication (*) at E:/Program Files/Per
l/lib/Time/Local.pm line 76.
Use of uninitialized value in integer multiplication (*) at E:/Program Files/Per
l/lib/Time/Local.pm line 76.
and it is repetative
Please Help !!!
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.