Problems with WMI Events scripts

Problems with WMI Events scripts

Post by RMOpYm9yYW » Sat, 17 Jan 2004 04:21:33


Hi

I'm working with WMI in a Windows 2000 Professional operating system
When management events, I have problems with the standard consumers ActiveScriptEventConsumer and SMTPEventConsumer.
I have registered them and run the scripts, but I have no response. In the wbemess.log file I have found the errors: "Consumer provider ActiveScriptEventConsumer does not support IWbemUnboundObjectSink: error code 80004002" , and "Consumer provider SMTPEventConsumer does not support IWbemUnboundObjectSink: error code 80004002. SMTP command "VRFY XXXX@XXXXX.COM returned 502. Unable to send message: 0xFFFFFFFF"

I have tried with success the same scripts in a Windows XP operating system. (In that operating system the standard consumers are already registered in CIM repository.

Does anybody know why it doesn't work in W2K and it does in Windows XP? Have anybody experienced a similiar situation, or may somebody provide me some information about it?

Thanks in advance. Dborah
 
 
 

1. Event 1524 when running a WMI Script

2. Giving access to Security Event Log NT 4.0 for the WMI script

Help me please.
I run WMI script on Windows NT 4.0 Server SP6a with WMI 1.5 Core installed.
I want backup and clear Security Log. I see popup message:
Windows Script Host
Script: MyScript
Line: 27
Char: 5
Error: Access denied
Code: 80041003
Source: SWbemObject

My script:
dtmThisTime = Hour(Time) & "." & Minute(Time) & "." & Second(Time)
dtmThisDay = Day(Date)
dtmThisMonth = Month(Date)
dtmThisYear = Year(Date)

strComputer = "."

rem %windir%
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select * from
Win32_OperatingSystem",,48)
For Each objItem in colItems
Win_Path = objItem.WindowsDirectory
Next

Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate,(Backup, Security)}!\\" & _
strComputer & "\root\cimv2")


rem
strBackupName = Win_Path & "\log\Sec_" & _
dtmThisDay & "-" & dtmThisMonth & "-" & dtmThisYear & " " & dtmThisTime

Set colLogFiles = objWMIService.ExecQuery _
("Select * from Win32_NTEventLogFile where LogFileName='Security'")
For Each objLogfile in colLogFiles
objLogFile.BackupEventLog(strBackupName & _
".evt")
objLogFile.ClearEventLog()
Next

3. WMI Scripting and ADSI WMI made (very) easy

4. WMI Corruption issues - Need a WMI Script fix

5. WMI Error(event 10010) - failed to initialize all required WMI cla

6. Resubscripe to an wmi event watch and narrow down a wmi query

7. Select-Alive script (was: Wmi Ping sweep script)

8. problems running WMI script for printers installation

9. problem with WMI script in javascript

10. Problem capturing the full message in the Security Log using WMI Script

11. Problem with wmi script code ok but result no

12. System events and WMI event listener

13. WMI events on windows 2000: Disk Drive events

14. WMI [out] parameter script problem

15. event ID 3002 on tcp.sys integrity and event ID 10 on WMI sesclu