Aug 9, 2010, 6:43 AM
Post #1 of 1
I'm using the Win32::OLE->CreateObject('WbemScripting.SWbemLocator') method to make WMI calls to remote machines. However, there are times that the WMI call/query takes several minutes to either come back with or without information. I want to set a time limit on the WMI call and then terminate it without existing the Perl script. I'm also using an eval with alarm(10) and syntax similar to $service = $locator->ConnectServer($machine, "root\\cimv2", $un, $pw)
How do you terminate a Win32 (WMI) call?
The eval does not terminate the call after 10 seconds like I was hoping it would.
Does anybody have any suggestions? I would greatly appreciate it. Thank you.