You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
11 lines
417 B
11 lines
417 B
# The following sample registers to be informed whenever an instance
|
|
# of the class MyClass is created
|
|
|
|
use Win32::OLE;
|
|
$objServices = Win32::OLE->GetObject('cim:root/default');
|
|
$objEnum = $objServices->ExecNotificationQuery ("select * from __instancecreationevent where targetinstance isa 'MyClass'");
|
|
|
|
$enum = Win32::OLE::Enum->new ($objEnum);
|
|
while ($event = $enum->Next()) {
|
|
print "Got an event\n";
|
|
}
|