Writeing to the Windows Event Log?

Hi,

How would I write to the windows NT event log from a scheduled Lotusscript agent ?

Don’t ask why, complicated use of Microsoft’s MOM for Business application errors.

I’ve found a post on how to read from the NT Event Log, But I’m after puting together some lotuscript code to write to this log.

Anyone done this before or can offer me some advise?

Thanks

J.

Other post on reading from the NT Event Log:

http://www-10.lotus.com/ldd/nd6forum.nsf/55c38d716d632d9b8525689b005ba1c0/b7a6a012075782358525708b004eb8b9?OpenDocument&Highlight=0,Win32_NTLogEvent

Subject: Writeing to the Windows Event Log ??

Try to find logeevent.exe on the system:

http://support.microsoft.com/kb/315410

If not on your system, try the web, it appears to have been part of the NT Service Pack 4:

http://download.microsoft.com/download/winntsrv40/rktools/1.0/NT4/EN-US/sp4rk_i386.Exe

I downloaded the executable above and used command-line to extract the files without installing (not sure what it would do to my XP system, don’t want to chance it). From DOS you can run the executable:

sp4rk_i386.Exe /T:temp /C

which creates a temp directory that will have a sp4rkx86.cab file. Then you can extract it’s contents like so:

expand -f:. sp4rkx86.cab .

Once you get your hands on the executable, you can Shell() a command to it.

Hope this helps.

Subject: Writeing to the Windows Event Log ??

  • This is a wild-hair idea. Read it at your peril. (grin)- I’ve never used this, but I’m pretty much of the opinion that wscript has full, unabridged access to the entire machine. I know it can read anything in The Registry … I’d expect it to do anything after that. Let’s take it as given that wscript can in fact do whatever it likes to your system whenever it feels like it.

  • Use your language of choice to write a flat file of wscript to add the event log entry you want, then tell Winbloze to run it, and delete the wscript file when you’re done.

  • Hope this helps…