CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
Search Posts SEARCH
Who's Online WHO'S
Log in LOG

Home: Perl Programming Help: Intermediate:
Win32::OLE problem


New User

Jan 22, 2008, 8:48 AM

Post #1 of 1 (420 views)
Win32::OLE problem Can't Post

Hi all,

I have recently upgraded one of my programs to utilize the Win32::OLE module. This is contained within a function which looks like this:

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;
return -1;

The strComputer variable was defined in the beginning of the program to be ".", the local system. Also, I have set the $Win32::OLE::Warn variable to be 3. When my program gets to the first line of this function, it gives me the following error:

Win32::OLE(0.1701) error 0x80070422: "The service cannot be started, 
either because it is disabled or because it has no enabled devices
associated with it"
after character 0 in "winmgmts://.root/cimv2" ....

...and it goes on to list line numbers and the such.

I should also mention that this program has been deployed on over 100 servers, some with Windows 2000 and some with Windows 2003. I have not seen this on any Windows 2003 systems and have only seen it on a subset of the Windows 2000 systems.

Any insight would be helpful.



Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives