Win32::OLE error in thread (ActiveSatate 5.8) on XP

M

MoshiachNow

HI,

The code is :
$thr = threads->new(\&THREAD,"$computer");
sub THREAD {
use Win32::OLE qw( in with );
my $computer=shift;
$objWMIService =
Win32::OLE->GetObject("winmgmts:\\\\$computer\\root\\CIMV2") ||
&disp("WMI connection failed.\n",'RED');
$colItems = $objWMIService->ExecQuery("SELECT * FROM
Win32_Product", "WQL",
wbemFlagReturnImmediately | wbemFlagForwardOnly);
}
$thr->join();



The error is :

Win32::OLE(0.1703) error 0x800401e4: "Invalid syntax"
after character 0 in "winmgmts:\\26842CILXP\root\CIMV2" at
D:\DOcuments\Ripro\AIX\mysc
ripts\pod_check.pl line 977
eval {...} called at
D:\DOcuments\Ripro\AIX\myscripts\pod_check.pl line 977
main::THREAD('26842CILXP') called at
D:\DOcuments\Ripro\AIX\myscripts\pod_check.pl
line 973
eval {...} called at
D:\DOcuments\Ripro\AIX\myscripts\pod_check.pl line 973 (#12)
Win32::OLE(0.1703) error 0x800401e4: "Invalid syntax"

Appreciate ideas.
Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,968
Messages
2,570,154
Members
46,702
Latest member
LukasConde

Latest Threads

Top