ActiveX component can't create object: 'MOM.ScriptAPI'
I am having an issue on some servers where I get this error: ActiveX component can't create object: 'MOM.ScriptAPI' The script is valid as it runs fine on some servers. But on some it will not run…. The agents are installed and supposedly the servers are the same (Server 2003, X64 SP2) etc., Normally we run the action account as system – I have tried a lower privileged Action Account and also one as an administrator on this box…. I tried running the script from the health service temp files with cscript /nologo but get the same error… Any hints or tips will be appreciated,Len Havron
September 27th, 2010 7:38pm

Hi Len Are these domain controllers? Or are they being used as clients in AD monitoring? If so, are they manually installed agents? If so, you'll also need to manually install ooMads.msi http://technet.microsoft.com/en-us/library/cc950511.aspx If the above does not apply, what is the full error you are getting? Is there more info in the operations manager event log? Cheers GrahamView OpsMgr tips and tricks at http://systemcentersolutions.wordpress.com/
Free Windows Admin Tool Kit Click here and download it now
September 27th, 2010 8:39pm

Graham, These clients are not used in AD monitoring but they were manually installed. There are a few scripts (Microsoft developed) that fail with the same error -- I will dig through the eventlog more closely but basically they just show the script path with the error "ActiveX component can't create object: 'MOM.ScriptAPI'"... As I mentioned above -- the agents are installed, and are showing monitoring -- in fact they have some errors from another MP. So from a SCOM agent standpoint the clients look ok... We tried to run the scripts manually and they appear to fail right at SetoAPI = CreateObject ("MOM.ScriptAPI") section of the script.Len Havron
September 27th, 2010 9:17pm

Graham, Here is one of the errors: Event Type: Warning Event Source: Health Service Modules Event Category: None Event ID: 21406 Date: 9/27/2010 Time: 8:36:56 PM User: N/A Computer: Computer Description: The process started at 8:36:56 PM failed to create System.Discovery.Data. Errors found in output: C:\Program Files\System Center Operations Manager 2007\Health Service State\Monitoring Host Temporary Files 29\228\DiscoverWindowsOSProperties.vbs(7, 1) Microsoft VBScript runtime error: ActiveX component can't create object: 'MOM.ScriptAPI' Command executed: "C:\WINDOWS\system32\cscript.exe" /nologo "DiscoverWindowsOSProperties.vbs" 0 {EA3B85C1-AD08-845E-3AFE-18205F780C7D} {0895E951-252C-3633-8021-D77E747D75E8} ComputerName Working Directory: C:\Program Files\System Center Operations Manager 2007\Health Service State\Monitoring Host Temporary Files 29\228\ One or more workflows were affected by this. Workflow name: Microsoft.SystemCenter.DiscoverWindowsOSProperties Instance name: Computer Name Instance ID: {0895E951-252C-3633-8021-D77E747D75E8} Management group: MG_NMAME For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp. Len Havron
Free Windows Admin Tool Kit Click here and download it now
September 27th, 2010 9:41pm

Graham, One other item -- I ran ooMads.msi on the agent computer and still get the same error. What are some possible options here? Len Havron
September 27th, 2010 10:35pm

Hi, Please check if any information on the following thread will help: http://graycloud.com/operations-manager/script-fails-run-because-type-mismatch-t29826.html Please Note: Since above web sites are not hosted by Microsoft, the links may change without notice. Microsoft does not guarantee the accuracy of this informationPlease remember to click Mark as Answer on the post that helps you, and to click Unmark as Answer if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
Free Windows Admin Tool Kit Click here and download it now
September 28th, 2010 11:19am

Hi Len If the servers aren't domain controllers then installing ooMADs.msi won't help - it is an active directory helper object for the AD management pack. My gut feel, especially if the errors all relate to discoveries, is that this is a WMI issue. Could you do the following on the server with the Windows Discovery error that you posted above: 1) Start, Run, WBEMTest 2) Click Connect - it should come up with the namespace of root\cimv2 - just click on connect without changing anything 3) Click Query - paste in the following and then click apply SELECT Version,Caption,BuildNumber,CSDVersion,ServicePackMajorVersion,ServicePackMinorVersion,SerialNumber,InstallDate,WindowsDirectory,TotalVisibleMemorySize FROM Win32_OperatingSystem 4) You should get a window with the result Win32_OperatingSystem=@ .. double click this line and a new window should pop up - the middle window has properties which should include caption = operating system, version, windows directory Let us know if the above completes - it might be a permissions problem with WMI (unlikely as the error doesn't include any access denied messages) or it could be that WMI has a problem on the servers and needs to be rebuilt. Cheers GrahamView OpsMgr tips and tricks at http://systemcentersolutions.wordpress.com/
September 28th, 2010 11:29am

Hi, As you're using the low-privileged account as service account for agent, can you check Agent Action Account section here: http://technet.microsoft.com/en-us/library/bb735419.aspx and check all permissions for that account?http://OpsMgr.ru/
Free Windows Admin Tool Kit Click here and download it now
September 28th, 2010 1:05pm

This seems to be a cscript issue. We can create the MomScriptAPI object with a basci script. But when we run the failed (multiple) scripts they fail. But if we double click on them they run (wscript is set as default). So the prevailing thought is this is a cscript version issue. Does any one have thoughts on this issue?Len Havron
September 28th, 2010 8:02pm

Finally solved this elusive problem. We ended up getting the hot fix from http://blogs.technet.com/b/yongrhee/archive/2009/10/29/x64-windows-script-5-7-for-windows-server-2003.aspx This upgraded WSH from 5.6 to 5.7 Len Havron
Free Windows Admin Tool Kit Click here and download it now
September 29th, 2010 1:43am

I was seeing this on a server after applying CU4 and not seeing the patchlist at all. Ran the script manually and got the same error. I resolved it by moving the correct version of cscript and wscript into system32. Somehow the 32-bit version was in there. I did not need to upgrade cscript from 5.6 though.
February 4th, 2011 8:14pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics