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:
The following is logged in the Wbemess.log file:
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
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.
- Save the file as Test.vbs.
- 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.
- In the left pane, right-click Actions, point to New, and then click Script Action.
- In the Script Action Properties dialog box, click the Details tab.
- Click Browse, and then select the Test.vbs script file.
- In the left pane, right-click the computer name, point to New, and then click Data Group.
- In the New Data Group Properties dialog box, click the Actions tab, and then click New Action Association.
- 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.
- Double-click the alert.
Keywords: kbprb KB815058