Microsoft KB Archive/295856

= Script does not run and &quot;Interface has too many methods to fire events from&quot; message appears in the alert history in MOM 2000 and MOM 2005 =

Article ID: 295856

Article Last Modified on 12/4/2007

-

APPLIES TO


 * Microsoft Operations Manager 2000 Service Pack 1
 * Microsoft Operations Manager (MOM) 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 &quot;(null)&quot; 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.



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(&quot;WScript.Shell&quot;)

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:

http://technet.microsoft.com/en-us/opsmgr/bb498241.aspx

Keywords: kbscript kbopmaneventmgmt kbopmanalerts kberrmsg kbevent kbtshoot kbbug kbpending KB295856

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.