Lotus Notes, Sametime and Java working together

Sametime and Domino solutions
Lotus Notes/Domino and Sametime software made easy
 


Get notification about
updates

 

Read Windows Event Log entries using a LotusScript agent

This LotusScript agent reads all entries in Window Event Log

Sub Initialize
'Copyright Botstation (www.botstation.com)

strComputer ="localhost" ' "127.0.0.1"

Set wbemServices = GetObject("winmgmts:\\" & strComputer)
Set wbemObjectSet = wbemServices.InstancesOf("Win32_NTLogEvent")
Forall wbemObject In wbemObjectSet

Print "Log File: " & wbemObject.LogFile & vbCrLf & _
"Record Number: " & wbemObject.RecordNumber & vbCrLf & _
"Type: " & wbemObject.Type & vbCrLf & _
"Time Generated: " & wbemObject.TimeGenerated & vbCrLf & _
"Source: " & wbemObject.SourceName & vbCrLf & _
"Category: " & wbemObject.Category & vbCrLf & _
"Category String: " & wbemObject.CategoryString & vbCrLf & _
"Event: " & wbemObject.EventCode & vbCrLf & _
"User: " & wbemObject.User & vbCrLf & _
"Computer: " & wbemObject.ComputerName & vbCrLf & _
"Message: " & wbemObject.Message & vbCrLf

End Forall


End Sub



Example output:






© Copyright 2004. Botstation