in reply to Re^2: I wish to monitor and react according to windows "Task Manager"
in thread I wish to monitor and react according to windows "Task Manager"

Where do you get the error? What is the exact text of the error? What is the exact code you are running?

Please read How (Not) To Ask A Question.

I will also need the exact version of Perl (perl -v tells you this). The Win32 modules do not work under any other operating system than Windows.

  • Comment on Re^3: I wish to monitor and react according to windows "Task Manager"

Replies are listed 'Best First'.
Re^4: I wish to monitor and react according to windows "Task Manager"
by moked (Beadle) on Dec 29, 2004 at 11:27 UTC
    for only these two lines:
    use Win32::Process::Info;
    #!/usr/bin/perl -w
    use strict;
    my $pi = Win32::Process::Info->new (undef, 'WMI');

    I get:
    Odd number of elements in anonymous hash at C:/Perl/lib/Win32/Process/Info.pm line 202.
    Can't locate object method "_Typelibs" via package "Win32::OLE::Const" at C:/Perl/lib/Win32/OLE/Cons t.pm line 20.
    Compilation failed in require at C:/Perl/lib/Win32/Process/Info/WMI.pm line 162.
    BEGIN failed--compilation aborted at C:/Perl/lib/Win32/Process/Info/WMI.pm line 162.
    Compilation failed in require at C:/Perl/lib/Win32/Process/Info.pm line 199. at C:\try7.pl line 6

    What culd be the cause?

      I count four lines:

      #!/usr/bin/perl -w use strict; use Win32::Process::Info; my $pi = Win32::Process::Info->new (undef, 'WMI');

      and for me, using Windows 2000 and Perl 5.8.5, the snippet compiles without any problem. I'm using version 1.002 of Win32::Process::Info:

      C:\Projekte>perl -MWin32::Process::Info -e "die $Win32::Process::Info: +:VERSION" 1.002 at -e line 1, <DATA> line 164.
        I am using Perl 5.8.6 on windows XP
        and my Win32::Process::Info is of version 1.003

        Do you think XP might be the problem?