Script does not run and "Interface has too many methods to fire events from" message appears in the alert history in MOM 2000 and MOM 2005 (295856)



The information in this article applies to:

  • Microsoft Operations Manager 2000
  • Microsoft Operations Manager 2005

This article was previously published under Q295856

SYMPTOMS

When a script that contains a call to a WScript object method, for example the WScript.CreateObject, that runs as a response to an alert, the script is not completed successfully. The History tab for the alert contains the following error message as the exit code:
Interface has too many methods to fire events from
Also, the History log may display the name of the script as "(null)" instead of using the name of the script.

CAUSE

This behavior occurs because the objects that are available to scripts that run in the Windows Script Host environment, for example the WScript object, do not exist in the MOM scripting runtime. The MOM Scripting Engine treats WScript objects as syntax errors. Also, some methods that use the WScript object require user interaction. Do not call objects like Wshell.Popup() or WShell.SendKeys in a MOM scripting environment. These objects can cause the scripts to fail.

STATUS

This behavior is by design.

MORE INFORMATION

MOM 2000

The MOM agent has a separate script context and does not automatically create a WScript object. However, you can create and use any object under the WScript object model. For example, the following syntax creates a WshShell object:

Set oShell = CreateObject("WScript.Shell")



You can find most of the WScript object's functionality in the MOM script context or in the helper object OpScrUtil that was included with MOM 2000. See the Scripting Help topic in MOM 2000 for more information.

MOM 2005 For more information about script with MOM 2005, see the MOM SDK. To do this, visit the following Web site:

Modification Type:MinorLast Reviewed:6/13/2005
Keywords:kbScript kbOpmanEventMgmt kbOpmanAlerts kberrmsg kbEvent kbtshoot kbbug kbpending KB295856 kbAudITPRO