in reply to Win32::OLE module not working
I get:use Win32::OLE; my $strComputer = qw|.|; &checkSEINPerformance; sub checkSEINPerformance { my $objWMI = Win32::OLE->GetObject('winmgmts://' . $strComputer . +'/root/cimv2'); my $colProcesses = $objWMI->InstancesOf('Win32_Process'); foreach my $objProcess (in $colProcesses) { if ($objProcess->Name =~ /SEINPerformance/) { return $objProcess->ProcessID; } else { print qq|NOT IT: | . $objProcess->Name . qq|\t| . $objProcess->ProcessID . qq|\n|; } } return -1; } 1;
NOT IT: System Idle Process 0 NOT IT: System 4 NOT IT: smss.exe 480 NOT IT: csrss.exe 544 NOT IT: wininit.exe 592 ...
Celebrate Intellectual Diversity
|
|---|