Hi,
I am trying to access the BlockSize property within the
Win32_MemoryArray WMI object in Perl on WinXP. I can access the Caption, but
the BlockSize is returning blank. Here is my code:
use Win32::OLE qw(in with);
$host = ".";
$WMI = Win32::OLE->new('WbemScripting.SWbemLocator') || die "Cannot access
WMI on local machine: ", Win32::OLE->LastError;
$Services = $WMI->ConnectServer($host) || die "Cannot access WMI on remote
machine: ", Win32::OLE->LastError;
$mem_set = $Services->InstancesOf("Win32_MemoryArray");
foreach $mem (in($mem_set)) {
$cp = $mem->{'Caption'};
$bs = $mem->{'BlockSize'};
print "The caption is $cp\n";
print "Block Size is $bs\n";
}
exit 0;
The output on my machine is:
The caption is Memory Array
Block Size is
Can anyone help?
Thanks,
Tal
_______________________________________________
Boston-pm mailing list
[EMAIL PROTECTED]
http://mail.pm.org/mailman/listinfo/boston-pm