‘ActiveX component can’t create object解决方法

Event Type:    Warning
Event Source:    Health Service Script
Event Category:    None
Event ID:    1
Date:        2/13/2009
Time:        12:18:09 PM
User:        N/A
Computer:    BADDC01
Description:
AD Op Master Response : The script ‘AD Op Master Response’ failed to create object ‘McActiveDir.ActiveDirectory’.  This is an unexpected error.
The error returned was: ‘ActiveX component can’t create object’ (0x1AD)

For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.

Cause: For whatever reason, the Active Directory helper object is not being installed as part of the active directory management pack.

Solution: Install the helper object OOMADs.msi. This can be found in 1 of 2 places.
First, look in the install directory of OpsMgr on the server with the issue – typically that would be C:\Program Files\System Center Operations Manager 2007\HelperObjects

 OR   C:\Program Files\System Center Operations Manager 2007\HelperObjects on your management server(s)

If it’s not there, then you can also find it on the install media under \HelperObjects\<ARCH> (Where arch is amd64, i386 or ia64).
Restart your agent, and it should clean itself up.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
这个错误通常是由于缺少相关的组件或对象库引起的。在VBScript中,`System.Text.Encoding`是不可直接创建对象的。为了解决这个问题,可以使用`ScriptControl`对象来进行Base64编码。以下是修改后的代码示例: ```vbscript Set objFSO = CreateObject("Scripting.FileSystemObject") Set objFile = objFSO.CreateTextFile("input.txt", True) strText = "这是要保存的字符串内容" objFile.Write strText objFile.Close Set objShell = CreateObject("Shell.Application") Set sourceFolder = objShell.NameSpace(".") Set compressedFile = sourceFolder.Items.Item("input.txt") zipPath = "compressed.zip" objShell.NameSpace(zipPath).CopyHere compressedFile Set objStream = CreateObject("ADODB.Stream") objStream.Type = 1 ' Binary objStream.Open objStream.LoadFromFile zipPath base64String = objStream.Read( -1 ) objStream.Close Set objFSO = CreateObject("Scripting.FileSystemObject") objFSO.DeleteFile zipPath Set scriptControl = CreateObject("MSScriptControl.ScriptControl") scriptControl.Language = "JScript" base64String = scriptControl.Eval("(function(){var base64EncodeChars='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';var out='',i=0,len=base64String.length;while(i<len){var c1,c2,c3,enc1,enc2,enc3,enc4;c1=base64String.charCodeAt(i++);c2=base64String.charCodeAt(i++);c3=base64String.charCodeAt(i++);enc1=c1>>2;enc2=((c1&3)<<4)|(c2>>4);enc3=((c2&15)<<2)|(c3>>6);enc4=c3&63;if(isNaN(c2)){enc3=enc4=64;}else if(isNaN(c3)){enc4=64;}out=out+base64EncodeChars.charAt(enc1)+base64EncodeChars.charAt(enc2)+base64EncodeChars.charAt(enc3)+base64EncodeChars.charAt(enc4);}return out;})()") WScript.Echo base64String ``` 这段修正后的代码使用了`MSScriptControl.ScriptControl`对象来执行JScript代码进行Base64编码。它将字符串保存到txt文件中,将txt文件压缩为zip文件,然后将zip文件内容转换为Base64字符串并输出。 请确保在运行VBScript之前已经安装了相应的运行环境,如Windows操作系统。 希望这次能够解决问题!
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值