I'm trying to figure out why I'm getting this error on on machine (WinNT4.0
SP6.0a)
with perl 5.22 loaded, when another machine which has the same setup does as
expected.

Any suggestions?

Win32::OLE(0.1101) error 0x800401e4: "Invalid syntax"
    after character 0 in "winmgmts:" at D:\Perl\bin\process.pl line 5
Can't call method "InstancesOf" on an undefined value at
D:\Perl\bin\process.pl
line 5.

The script is as follows:
#! perl -w

use Win32::OLE;

$instances =
Win32::OLE->GetObject('winmgmts:')->InstancesOf('Win32_Process') or die
"Cannot access WMI";
print " PID     Memory  Process Name\n";
print " ----    ------  --------------------------\n";
for my $proc (in $instances) {
    printf "%5d %7d k  %s\n", $proc->{ProcessId},
$proc->{WorkingSetSize}/1024, $proc->{Name};
}



---
You are currently subscribed to perl-win32-users as: [archive@jab.org]
To unsubscribe, forward this message to
         [EMAIL PROTECTED]
For non-automated Mailing List support, send email to  
         [EMAIL PROTECTED]

Reply via email to