Microsoft KB Archive/815058

From BetaArchive Wiki

Article ID: 815058

Article Last Modified on 7/4/2003



APPLIES TO

  • Microsoft Application Center 2000 Standard Edition
  • Microsoft Application Center 2000 Standard Edition
  • Microsoft Application Center 2000 Service Pack 2



SYMPTOMS

When you create a script action in Health Monitor and try to run a script written in Unicode, the script action is unsuccessful and you receive the following error message:

Action failed. View the system32\wbem\logs\wbemess.log for more information. 0x80020101 :

The following is logged in the Wbemess.log file:

(Thu Apr 17 15:43:45 2003) : Consumer provider ActiveScriptEventConsumer does not support IWbemUnboundObjectSink: error code 80004002
(Thu Apr 17 15:43:45 2003) : Failed to parse script. Error code 80020101 Scripting engine says: Microsoft VBScript compilation error: Invalid character
(Thu Apr 17 15:43:45 2003) : Failed the first attempt to deliver an event to event consumer ActiveScriptEventConsumer.{8F43FF50-CCAE-406F-8EA5-F7DA0AC6611B} with error code 80020101. WMI will reload and retry.
(Thu Apr 17 15:43:45 2003) : Consumer provider ActiveScriptEventConsumer does not support IWbemUnboundObjectSink: error code 80004002
(Thu Apr 17 15:43:45 2003) : Failed to parse script. Error code 80020101 Scripting engine says: Microsoft VBScript compilation error: Invalid character
(Thu Apr 17 15:43:45 2003) : Failed the second attempt to deliver an event to event consumer ActiveScriptEventConsumer.{8F43FF50-CCAE-406F-8EA5-F7DA0AC6611B} with error code 80020101. This event is dropped for this consumer.
(Thu Apr 17 15:43:45 2003) : Dropping event destined for event consumer ActiveScriptEventConsumer.{8F43FF50-CCAE-406F-8EA5-F7DA0AC6611B} in namespace root\cimv2\MicrosoftHealthMonitor
(Thu Apr 17 15:43:46 2003) : Failed to parse script. Error code 80020101 Scripting engine says: Microsoft VBScript compilation error: Invalid character
(Thu Apr 17 15:43:46 2003) : Failed the first attempt to deliver an event to event consumer ActiveScriptEventConsumer.{8F43FF50-CCAE-406F-8EA5-F7DA0AC6611B} with error code 80020101. WMI will reload and retry.
(Thu Apr 17 15:43:46 2003) : Consumer provider ActiveScriptEventConsumer does not support IWbemUnboundObjectSink: error code 80004002
(Thu Apr 17 15:43:46 2003) : Failed to parse script. Error code 80020101 Scripting engine says: Microsoft VBScript compilation error: Invalid character
(Thu Apr 17 15:43:46 2003) : Failed the second attempt to deliver an event to event consumer ActiveScriptEventConsumer.{8F43FF50-CCAE-406F-8EA5-F7DA0AC6611B} with error code 80020101. This event is dropped for this consumer.
(Thu Apr 17 15:43:46 2003) : Dropping event destined for event consumer ActiveScriptEventConsumer.{8F43FF50-CCAE-406F-8EA5-F7DA0AC6611B} in namespace root\cimv2\MicrosoftHealthMonitor
(Thu Apr 17 15:44:01 2003) : Unloading event consumer sink ActiveScriptEventConsumer.{8F43FF50-CCAE-406F-8EA5-F7DA0AC6611B}

CAUSE

Health Monitor cannot run scripts written in Unicode.

RESOLUTION

To resolve the problem, write scripts in ANSI.

STATUS

This behavior is by design.

MORE INFORMATION

Steps to Reproduce the Behavior

  1. Paste the following script in Notepad:

    WriteToFile
    
    Function WriteToFile
      Const ForReading = 1, ForWriting = 2
      Dim fso, f
      Set fso = CreateObject("Scripting.FileSystemObject")
      Set f = fso.OpenTextFile("C:\test.txt", ForWriting, True)
      f.Write "test" 
      Set f = fso.OpenTextFile("C:\test.txt", ForReading)
      WriteToFile =  f.ReadLine
    End Function

    Note This script creates a Test.txt file in drive C with a test string in the file.

  2. Save the file as Test.vbs.
  3. On a computer with Application Center 2000 Service Pack 2 installed, click Start, point to Programs, point to Administrative Tools, and then click Health Monitor.
  4. In the left pane, right-click Actions, point to New, and then click Script Action.
  5. In the Script Action Properties dialog box, click the Details tab.
  6. Click Browse, and then select the Test.vbs script file.
  7. In the left pane, right-click the computer name, point to New, and then click Data Group.
  8. In the New Data Group Properties dialog box, click the Actions tab, and then click New Action Association.
  9. In the Action to Execute combo box, click Run test.VBS, and then click OK. Note that a message is logged in the right pane.
  10. Double-click the alert.


Keywords: kbprb KB815058